Answer Posted / ritesh kumar
Boxing is converting a value type to a reference type
(Object Type).Casting is converting a reference type to a
reference type or a value type as another value type.
int i = 0;
object o = (object)i; //this is boxing
int i2 = (int)o; //this is unboxing.
long l = (long)i; //this is casting.
| Is This Answer Correct ? | 29 Yes | 1 No |
Post New Answer View All Answers
What do you mean by hashtable c#?
Explain the difference between a sub and a function in c#.
what is the index value of the first element in an array?
What does return do in for loop?
Is object an int c#?
Does c# have a 'throws' clause?
How the versioning applies to Assemblies or can you explain version numbers?
What is the purpose of a namespace?
What is the difference between dll and lib?
What is difference between interface and abstraction?
What is file extension of webservices?
What is the use of convert toint32 in c#?
How to do and Apply Themes to Datagrid,Lable,Textbox,etc., in C#.NET 2005 Windows Application? (like who we will do themes in ASP.NET using .CSS and .SKIN files). Urgent!!
What is an object and a class?
How many types of namespaces available in version4?