M
Mike
Ok, this is all very simple to me now.
It all stems from the fact VB/VB.NET is not case sensitive language
when it cames to identifiers.
It is long standard practice in languages like C/C++ and I guess C# to
use semantics such as:
TYPE_NAME type_name
i.e.
HANDLE handle;
LPCSTR lpcstr;
TXYZ xyz;
Because you can't readily do this in VB, for inherit keywords or
keywords that might conflict with existing identifiers, the brackets,
including name spaces helps serve this purpose. Of course, the
compiler and intellisense can determine what is what, but for
readability this can help the human code reader.
Thanks for your input
--
It all stems from the fact VB/VB.NET is not case sensitive language
when it cames to identifiers.
It is long standard practice in languages like C/C++ and I guess C# to
use semantics such as:
TYPE_NAME type_name
i.e.
HANDLE handle;
LPCSTR lpcstr;
TXYZ xyz;
Because you can't readily do this in VB, for inherit keywords or
keywords that might conflict with existing identifiers, the brackets,
including name spaces helps serve this purpose. Of course, the
compiler and intellisense can determine what is what, but for
readability this can help the human code reader.
Thanks for your input
--
Armin Zingler said:The _only_ reason to use them is to use a keyword as an identifier, be
it a
class name or a variable name.
One exception to this rule: A type's name is the same as one of the
keywords of the intrinsic types of VB, the namespace containing the
custom type is imported (explicitly or implicitly), and you want to use
the type without qualifying it by its namespace:
\\\
Private Sub Test()
Dim s As [String] ' Binds to the custom 'String' class.
Dim t As String ' Binds to 'System.String'.
End Sub
...
Public Class [String]
Public Value As String
End Class
///