[IronPython] C#, Types and IronPython

Keith J. Farmer kfarmer at thuban.org
Sat Mar 10 22:23:27 CET 2007


http://msdn2.microsoft.com/en-us/library/system.type.gettype.aspx

The C# typeof(typeid) operator doesn't take a string.  Instead, it takes the type identifier and returns an object representing that type.  It's basically a compile-time operation.

The framework's Type.GetType methods are runtime operations that take some input (eg, a string containing the name of a type, or a variable whose type you want to know) and return the appropriate Type object.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord
Sent: Saturday, March 10, 2007 5:35 AM
To: Discussion of IronPython
Subject: [IronPython] C#, Types and IronPython

Hello all,

Despite my previous email, I still need some help. :-)

I have some C# that is getting at type objects in several different 
ways, and I would like to know the difference.

Type.GetType("int")
typeof(int)

and I think :

int.GetType()

What are the differences in semantics between 'typeof(...)' and 
'Type.GetType(...)' ?

All the best,

Michael
http://www.voidspace.org.uk/ironpython/
_______________________________________________
users mailing list
users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com




More information about the Ironpython-users mailing list