在ABC三处分别发生几次装箱行为,请说明理由!

static void Main(string[] args)
{
   int a = 5;
   object obj = a;  //box
   a = 123;

Console.WriteLine(a + "," + obj);                //A
Console.WriteLine(a + "," + (int)obj);          //B
Console.WriteLine(a.ToString() + "," + obj);//C

Console.Read(); 
}


aluckdog
浏览 593回答 2
2回答
打开App,查看更多内容
随时随地看视频慕课网APP