C#中简单的装箱操作演示代码,代码非常简单,将一个整数转换成Object
using System; class ConversionSample { static void Main() { int num1 = 123; Object obj = num1; Console.WriteLine(num1.ToString()); Console.WriteLine(obj.ToString()); } }
附件:源代码下载
C#中简单的装箱操作演示代码,代码非常简单,将一个整数转换成Object
using System; class ConversionSample { static void Main() { int num1 = 123; Object obj = num1; Console.WriteLine(num1.ToString()); Console.WriteLine(obj.ToString()); } }
附件:源代码下载