well i want an enum i can use in switch function.
i need to get that enum using something like iValue.GetType().somethingidontknow()
so basically this system enum should contain all the basic reference types like int , string , long and so on.
thanks
well i want an enum i can use in switch function. i need to
Share
You might want System.TypeCode. You can use Convert.GetTypeCode to get the TypeCode for an object or Type.GetTypeCode to get the TypeCode for a type. Note that this will be TypeCode.Object for any type that doesn’t have its own value in the enumeration.
Edit: In case this is related to your other recent question, there is an overload of Convert.ChangeType that takes a TypeCode, so you can do things like
Convert.ChangeType("123", TypeCode.Int32).