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
Differentiate between Web server controls and HTML?
Describe the term Address, Binding and contract for WCF Service?
How to ensure that no one has interfered with ViewState in the Web page?
Briefly describe constant.
Specify the differences between the Dispose() and Finalize() methods.
Write the two properties of the GridView control which have to be specified to turn on paging and sorting?
How one can retrieve the customized properties of the .NET application from a XML .config file?
What is meant by Delegate?
Illustrate the difference between the const and readonly?
Name the different types of authentication techniques which are used in the connection strings to connect the .NET applications with the Microsoft SQL Server?
18,76,764
1935131 Asked
3,689
Active Tutors
1437410
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!