string不是基元类型,枚举是值类型
public enum ee
{
Success,
Fail,
}
class Program
{
static void Main()
{
Console.WriteLine(typeof(string).IsPrimitive);//false
Console.WriteLine(typeof(ee).IsValueType);//true
Console.ReadKey();
}
}
public enum ee
{
Success,
Fail,
}
class Program
{
static void Main()
{
Console.WriteLine(typeof(string).IsPrimitive);//false
Console.WriteLine(typeof(ee).IsValueType);//true
Console.ReadKey();
}
}