Marius,
In addition to the other comments:
Consider using:
type MetaClassName = class of TSomeClass;
Dim MetaClassName As Type = GetType(TSomeClass)
Be mindful of the GetType keyword, and the Type.GetType function.
The GetType keyword accepts a type identifier & will cause a compile error
if you give a non-existent type.
Dim MetaClassName As Type = GetType(TSomeClass)
The Type.GetType function accepts a string & will cause a runtime error if
you give it a non-existent type. Generally its safest to give a qualified
name to Type.GetType that includes the namespace along with the assembly.
Dim MetaClassName As Type = GetType("SomeNamespace.TSomeClass,
SomeAssembly")
For types within my assembly or assemblies that I know I have explicitly
referenced I will use the GetType keyword so as to ensure compile time
errors.
For types that I want to dynamically load, for example plugins listed in the
app/web config, I will use the Type.GetType function.
--
Hope this helps
Jay B. Harlow
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley -
http://www.tsbradley.net
"Marius" <ma**********@gmail.comwrote in message
news:11**********************@n67g2000cwd.googlegr oups.com...
>I am a Delphi programmer switching to vb.net. In Delphi you could
define a metaclasstype like
type MetaClassName = class of TSomeClass;
and you could use this type as a function result. This way you could
get as a function result the type of a class instead of an instance of
this class.
My question is, is there an equivalent in vb.net? And if so, what is
the syntax.
------
Marius