Articles → .NET → Boxing and unboxing in C#

Boxing and unboxing in C#






Boxing





Unboxing





Example






ArrayList al = new ArrayList();
al.Add(5); // Boxing

//  Unboxing
int firstValue = (int)al[0];



Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Sunday, May 10, 2015

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250