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
Are c# objects passed by reference?
What is throw in c#?
Can we use "this" command within a static method?
What is oledb in c#?
List down the reason behind the usage of c# language.
What is difference between string and string builder?
Constructor to an arbitrary base constructor?
What are c# i/o classes? What are the commonly used i/o classes?
What is writeline in c#?
What is asynccallback c#?
What is the predicate of a sentence?
What is the difference between ienumerable and icollection?
Name the method of servicebase class?
Is c# front end or back end?
Explain About .NET Framework