Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

boxing and unboxing in c#

class BoxingUnboxing
{  
    static void Main()  
    {  
        int myVal = 1;  
        object obj = myVal; // Boxing  
        int newVal = (int)obj; // Unboxing  
    }  
}  
Source by www.sean-lloyd.com #
 
PREVIOUS NEXT
Tagged: #boxing #unboxing
ADD COMMENT
Topic
Name
4+4 =