类型转化主要包括两种类型:显示转化和隐式转化

顾名思义,显示转化要有转化的标志

例子

int i=1;

 string str=i.ToString();

隐式转化是不用标志,是在内部处理的

例子

byte bt;

short sht=7;

bt=sht;

console.write("{0},{1}",sht,bt);

结果都是7;

相关文章:

  • 2022-12-23
  • 2021-10-30
  • 2021-07-02
  • 2022-12-23
  • 2021-05-16
猜你喜欢
  • 2022-01-16
  • 2021-08-26
  • 2021-11-12
  • 2021-06-05
  • 2021-07-09
  • 2022-12-23
  • 2021-08-27
相关资源
相似解决方案