Answers for "boxing and unboxing in c#"

C#
0

boxing and unboxing in c#

class BoxingUnboxing
{  
    static void Main()  
    {  
        int myVal = 1;  
        object obj = myVal; // Boxing  
        int newVal = (int)obj; // Unboxing  
    }  
}
Posted by: Guest on May-17-2021

C# Answers by Framework

Browse Popular Code Answers by Language