some simple types like int, string , ....are easy to realize that they are ValueTypes Or RefrenceTypes. But I wanna to know is there any way to distinguish?
All structs, enums and native types are value types.
At runtime you can check like this:
Type type = typeof(TypeName);
if (type.IsValueType)
{
//...
}
Strings are not value types.
Here is a list of the most commonly used value types:
Besides those:
All other types are reference types.