Wednesday, October 23, 2013

Boxing And UnBoxing

Boxing And UnBoxing

Boxing:
          if a value type is stored in a reference type variable we call it boxing.
                 int x=100;
                 object obj=x;
           if a reference type which contains value type in it if converted back into a value type we call it as unboxing.
              int y=convert.toint32(obj);



No comments:

Post a Comment