Converting form C# alias type to .NET framework type
-
There is an built-in types table for .NET framework type to C# type which are aliases of predefined types in the System namespace (http://msdn2.microsoft.com/en-US/library/ya5y69ds.aspx). How can use access and use this table (by C# code) to convert the alias to the .NET framework type. For example: if I have: string aliasType = "int"; string frameworkType = ??? ------- Thanks Sharon
-
There is an built-in types table for .NET framework type to C# type which are aliases of predefined types in the System namespace (http://msdn2.microsoft.com/en-US/library/ya5y69ds.aspx). How can use access and use this table (by C# code) to convert the alias to the .NET framework type. For example: if I have: string aliasType = "int"; string frameworkType = ??? ------- Thanks Sharon
It's a simple, Just create a function, accept c# type, use switch case statements, find and return respective .Net type...
M Aamir Maniar aamirOnline.com
-
It's a simple, Just create a function, accept c# type, use switch case statements, find and return respective .Net type...
M Aamir Maniar aamirOnline.com
Yes, I can use the switching for the string alias, and I can also use a hard coded hash table. But the .NET has this kind of table built-in, and I wish to use it (I don't like inventing the wheel all over, it's there already). Do you know how can I use this built-in table? ------ Thanks Sharon
-
Yes, I can use the switching for the string alias, and I can also use a hard coded hash table. But the .NET has this kind of table built-in, and I wish to use it (I don't like inventing the wheel all over, it's there already). Do you know how can I use this built-in table? ------ Thanks Sharon
I think it's easier to make a switch yourself than to try to find that table, which doesn't even have to exist (MSIL optimization and stuff).
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.." -- Mark McCormick
|| Fold With Us! || Pensieve || VG.Net ||