What is concept of Boxing and Unboxing ?
By in ASP.NET on Jul 26 2006
  • Suryakala
    Jul, 2006 26

    Boxing and Unboxing are quite helpful, when the type of the object you need are not definitive when creating it, and the caller can type cast it based on the method call.

    Ex:

    object o = GivemeResponse(params);

    MyResponse  aresp = (MyResponse) o;

    • 0
  • Bill Bort
    Jul, 2006 26

    Boxing is conversion (implicit) of value type to refference type

    e.g.

    object box;

    box=1;

    Unboxing is explicit conversion of refference type to value type

    e.g.

    int i=3;

    i=(int)box;

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS