📜  c#代码示例中的装箱和拆箱

📅  最后修改于: 2022-03-11 14:48:47.499000             🧑  作者: Mango

代码示例1
class BoxingUnboxing
{  
    static void Main()  
    {  
        int myVal = 1;  
        object obj = myVal; // Boxing  
        int newVal = (int)obj; // Unboxing  
    }  
}