[IronPython] C#, Types and IronPython
Michael Foord
fuzzyman at voidspace.org.uk
Mon Mar 12 15:16:30 CET 2007
Keith J. Farmer wrote:
> Reflector is your friend:
>
> http://www.aisto.com/roeder/dotnet/
>
>
Cool - many thanks Keith.
Michael
> Whether you see int or System.Int32 in C# code is a matter of aesthetics on the part of the person who wrote the code. As mentioned elsewhere, int is defined in C# as an alias for the type identifier System.Int32 (see below). The predefined types are listed in 8.2.1 of the C# spec:
>
> http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-334.pdf
>
> The predefined Simple types are in 11.1.4:
>
> Reserved word Aliased type
>
> sbyte System.SByte
> byte System.Byte
> short System.Int16
> ushort System.UInt16
> int System.Int32
> uint System.UInt32
> long System.Int64
> ulong System.UInt64
> char System.Char
> float System.Single
> double System.Double
> bool System.Boolean
> decimal System.Decimal
>
> typeof is defined in 14.5.11.
>
>
>
> -----Original Message-----
> From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord
> Sent: Sunday, March 11, 2007 8:08 AM
>
> Ok - cool. That's very helpful. I'm still not really used to the idea of
> decompiling assemblies to get this sort of information.
>
> Several of the MSDN examples use 'typeof(int)', why not just specify
> 'Int32' ? I guess it makes the code less platform dependent ?? Oh well.
>
> _______________________________________________
> 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