I want to get a System.Type
given a string
that specifies a (primitive) type\'s C# friendly name, basically the way the C# compiler d
Alias names like 'int','bool' etc. are not part of .NET Framework. Internally they are converted into System.Int32, System.Boolean etc. Type.GetType("int") should return you null. Best way to appoach this is by having a dictionary to map alias with their type e.g.
Dictionary PrimitiveTypes = new Dictionary();
PrimitiveTypes.Add("int", typeof(int));
PrimitiveTypes.Add("long", typeof(long));
etc.etc..