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
Describe the appSettings Section which contains in a web.config file?
Write the difference between adding items into cache by a Add() method and by the Insert() method?
Specify the similarities between a class and a structure.
Describe about the characteristic of Anonymous type?
List the difference between points, pixels, and em's at the time when fonts are displayed?
Write the difference between a toolstrip split button and a toolstrip drop-down button ?
The information, like role management membership, profile, and Web parts personalization is stored in which database?
Define the term Enumeration?
By what way we can display a default value in a text box of the input box?
What setting should be added in a configuration file to reject the particular user from accessing secured resources?
18,76,764
1945254 Asked
3,689
Active Tutors
1421692
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!