get the app get the app       get the app       get the app
What is concept of Boxing and Unboxing?


  • : 348
  • : 14
    Previous Next

    Boxing permits any value type to be implicitly converted to type object or to any interface type implemented by value type. Boxing is a process in which object instances are created and copy values in to that instance. Unboxing is vice versa of boxing operation where the value is copied from the instance in to appropriate storage location. Below is sample code of boxing and unboxing where integer data type is converted in to object and then vice versa.
    Dim x As Integer
    Dim y As Object
    x =10
    y = x ‘ boxing process
    x = y ‘ unboxing process

    you can suggest other answer in comment box


  • Exam: . NET Interview QUESTIONS





    Recommended Learning for you

    Close(X)
    Subscribe here for free mock test on IAS PCS SSC and other competitive exam. Signup here to get SSC CGL Solution and main exam study material