On Sun, Mar 11, 2007 at 02:27:11PM +0000, Michael Foord wrote: > What object does 'typeof(int)' (in C# *not* IronPython) return. I guess > it is not System.Int32 !
Indeed it is; I'm not sure why you're confused about this when a one-line C# program will give you the answer :-) typeof(int) is converted by the C# compiler into the following IL: ldtoken [mscorlib]System.Int32 call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) which makes it pretty clear that System.Int32 is specified at compile time. > Is there a common base class for the C# number types ? No; however there are several common interfaces these types implement, such as IConvertible. -- Nicholas Riley <[EMAIL PROTECTED]> | <http://www.uiuc.edu/ph/www/njriley> _______________________________________________ users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
