According to Lutz Roeder's .NET Reflector
(
http://www.aisto.com/roeder/dotnet), Declare statements are converted
to "attributish" style, for example
~
Friend Declare Auto Function LoadLibrary Lib "kernel32.dll" ( _
<MarshalAs(UnmanagedType.LPTStr)> ByVal LibFileName As String _
) As IntPtr
~
becomes
~
<DllImport("kernel32.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _
Friend Shared Function LoadLibrary(<MarshalAs(UnmanagedType.LPTStr)>
ByVal LibFileName As String) As IntPtr
End Function
~
To my mind, classic VB-style declarations are no bad (since they are not
considered as obsolete like On Error statements), because they take less
space and are easier to type (IMHO).