> What would be the analogous c++ statement for this C# code
>
[quoted text clipped - 12 lines]
> But it keeps giving me an error illegal call of
> non-static member function.
typeof(class) is the same as the static method invocation
System::Type::GetType("class") while
System::Object::GetType() is an instance method and you need
an object instance to invoke it.

Signature
// Alessandro Angeli
// MVP :: Digital Media
// a dot angeli at psynet dot net
Ravi Singh (UCSD) - 27 Dec 2004 18:19 GMT
Ahh,
I did __typeof() and that worked.
-Ravi Singh
Mattias Sj?gren - 27 Dec 2004 23:26 GMT
>typeof(class) is the same as the static method invocation
>System::Type::GetType("class")
Not quite. typeof() resolves the typename to a token at compile time,
whereas Type::GetType requires a lookup by name at runtime.
Mattias

Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Alessandro Angeli [MVP::DigitalMedia] - 28 Dec 2004 00:10 GMT
> Not quite. typeof() resolves the typename to a token at
> compile time, whereas Type::GetType requires a lookup by
> name at runtime.
Quite right, I oversimplified.

Signature
// Alessandro Angeli
// MVP :: Digital Media
// a dot angeli at psynet dot net