I used to be a C# developer so this commenting style was very easy in C#. This is driving me crazy but how do you do this in VB.NET without getting a syntax error?:
Private ReadOnly Property AcceptableDataFormat(ByVal e As System.Windows.Forms.DragEventArgs) As Boolean
Get
Return e.Data.GetDataPresent(DataFormats.FileDrop) _ 'this is a file that a user might manipulate
OrElse e.Data.GetDataPresent("FileGroupDescriptor") 'this is a typical Outlook attachment
End Get
End Property
Unfortunately you can't. VB.Net doesn't allow comments to appear in the middle of statements which span multiple lines (including both explicit and implicit line continuations). The comments must go above the statement or on it's final line.
The exception to this rule is statement lambdas. It is fine for comments to appear within a statement lambda even though it's technically one statement.