1、装箱拆箱

static void Main(string[] arg)
        {
            int i = 2000;
            object a = i;
            i = 2001;
            int j = (int)a;
            Console.WriteLine("i={0},a={1},j={2}", i, a, j);
            Console.ReadKey();
        }

2001,2000,2000
View Code

相关文章:

  • 2021-12-02
  • 2021-12-02
  • 2021-12-02
  • 2022-12-23
  • 2021-09-04
  • 2021-07-09
  • 2021-12-29
  • 2022-12-23
猜你喜欢
  • 2021-12-02
  • 2021-04-11
  • 2021-12-02
  • 2022-12-23
  • 2021-11-07
相关资源
相似解决方案