msdn 上给的

 

typeof(类型)

typeof表达式采用以下形式:

System.Type type = typeof(int); 
这样    Type 类型 的变量  type  存储的就是 int
若要获取表达式的运行时类型,可以使用 .NET Framework 方法 GetType,如以下示例中所示:
int i = 0;
System.Type type = i.GetType();

 

相关文章:

  • 2022-01-08
  • 2021-08-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-25
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-25
  • 2022-12-23
  • 2021-05-20
  • 2022-12-23
  • 2022-01-29
  • 2022-12-23
相关资源
相似解决方案