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
How do you secure your configuration files to be accessed remotely by unauthorized users?
Define data caching?
I have created a configuration setting in my web.config and have kept it at the root level. How do I prevent it from being overridden by another web.config that appears lower in the hierarchy?
Define transparent caching with aop?
Explain different types of validators in asp.net?
How you will manage the state of ASP.NET controls?
What is viewstate? What does the “enableviewstate” property do?
Which method do you use to kill explicitly a users session?
What is DataGrid wheater its a Server Control or something else ?
What are strong names?
What is the parent class of all web server control?
Which is faster viewbag or viewdata?
What is tracing? Where is it used?
What is %20 in a url?
Can you explain one critical mapping? Performance issue which one is better? Whether connected lookup tranformation or unconnected one?