Boxing and Unboxing
Distinguish between Boxing and Unboxing.
Expert
Whenever a value type is transformed into an object type, the procedure is termed as boxing; on the other hand, whenever an object type is transformed to the value type, the method is termed as unboxing. Boxing and unboxing permits the value types to be regarded as the objects. Boxing a value type packages it inside the sample of the Object reference type. This enables value type to be stored on the garbage collected heap. Unboxing extracts value type from an object. In the given example, the integer variable i is boxed and is assigned to the object obj.
Example:
int i = 123;
object obj = i; /* Thi line boxes i. */
/* The object obj can be unboxed and then be assigned to integer variable i: */
i = (int)obj; // unboxing
Explain the concept of strong names.
Write the name of the method which is used to create a click event of Control class for Button control in C#?
Write about features that are added in the .NET Framework 4.0.
What is meant by DLR (Dynamic Language Runtime)?
Specify the similarities between a class and a structure.
Briefly describe about XSLT?
Specify the way to suppress the final procedure inside the garbage collector forcibly in .NET?
Briefly describe key-based dependency and file-based dependency?
Which type of code, a client-side or a server-side, is found in the code-behind file of the Web page?
Write the difference between Arrays and Collection?
18,76,764
1947468 Asked
3,689
Active Tutors
1439434
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!