int x = 123;
System.Int32 y = 123;
Console.WriteLine(y);
输出
123
使用 typeof 运算符以获取表示指定类型的 System.Type 实例:
Type intType = typeof(int);
Console.WriteLine(intType.FullName);
Type stringType = typeof(string);
Console.WriteLine(stringType.FullName);
Type doubleType = typeof(System.Double);
Console.WriteLine(doubleType.FullName);
// Output:
// System.Int32
// System.String
// System.Double
输出
System.Int32 System.String System.Double