tags:

views:

891

answers:

2
typeof(int).Name

Will return System.Int32 does anyone know of a way to return "int"

+7  A: 

There aren't many types that are C# keywords (int, double, string) ... so perhaps you can write your own mapping function, from the System type name to the corresonding C# keyword.

ChrisW
+4  A: 

Yeah, you could write a mapping function. That is just an alias anyway.

Here is a list:

http://msdn.microsoft.com/en-us/library/86792hfa(VS.71).aspx

BobbyShaftoe
Thanks for the edit, I didn't realize that was messed up!
BobbyShaftoe