Wednesday, 4 January 2012

Boxing and UnBoxing in C#

Boxing is to pass any data type to object

eg :

   int v=25;
  object o=v;        //this is called boxing

and get data type from object is called UnBoxing
eg:

  int val =(int)o ;                //this is called unboxing

No comments:

Post a Comment