I am writing a code-generator that will need to output some miniscule portions of VB.NET code, and since this is a code generator that will add user-provider code, I'd like to try to avoid type name conflicts with types or names in the user-provided code.
In C#, I can prefix types with global::
to make sure they're matched from the global type namespace hierarchy, rather than some local name, but is there a similar system for VB.NET?
ie. this:
global::System.String
NET (VB.NET), is a multi-paradigm, object-oriented programming language, implemented on . NET, Mono, and the . NET Framework. Microsoft launched VB.NET in 2002 as the successor to its original Visual Basic language, the last version of which was Visual Basic 6.0.
VB.NET is a programming language designed to create applications that work with Microsoft's new . NET Framework. The . NET platform in turn addresses many of the limitations of “classic” COM, Microsoft's Component Object Model, which provided one approach toward application and component interoperability.
It's simply the Global
keyword:
Dim n As Global.System.Int32
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With