Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there something like "global::" for VB.NET?

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
like image 563
Lasse V. Karlsen Avatar asked Feb 06 '11 14:02

Lasse V. Karlsen


People also ask

Is. net and VB.NET the same?

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.

What is VB.NET used for?

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.


1 Answers

It's simply the Global keyword:

Dim n As Global.System.Int32
like image 196
Oded Avatar answered Oct 03 '22 19:10

Oded