What is Boxing and Unboxing?
Answer Posted / eduardo belmonte
Boxing is the process of converting value type to reference
type.
Unboxing is the process of converting from a reference type
to a value type.
Both are slow and should be avoided when possible or
unneeded.
Dim st AS String
Dim obj As Object
Dim n As Integer = 5
st = n ' Boxing happens
obj = n ' Boxing happens
n = st ' Unboxing happens
n = obj ' Unboxing happens
Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
What is the asp.net mvc folder conventions? : asp.net mvc
What are the advantages of asp.net?
What is content place holder?
What is the main difference between Asp.net and Vb.net?
Explain a program using razor view engine to create a simple application? : asp.net mvc
Define satellite assemblies.
what are the events raised in asp.net page life cycle?in which stage view state can be loaded?
What is different in .net 1.1 and .net 2.0?
What is bson in web api?
What is custom attribute?
Explain a program using code nuggets to create a simple application? : asp.net mvc
What are web server controls in asp.net?
What is paging in context of Memory?
Do session use cookies in asp net?
What describes a query?