Is string reference type / value type?
Answer Posted / n
Hi Guys
If any of you got so far.. Here is the deal:
The differnce between value types and reference types are
whether the information is stored in the stack or on the
heap. Design guidelines for designing structures (value
type, stored in the stack) is that it's instance value
should be less than 16 bytes.
In the .NET Framework, ALL value types are 16 bytes or
shorter.
A string can be a lot more than 16 bytes...
It does however act like a value type in order to make the
programming easier for us... This can be the reason for all
this confusion...
Now stop arguing and start converting coffee into code....
/N
| Is This Answer Correct ? | 14 Yes | 2 No |
Post New Answer View All Answers
What is difference between constants and readonly in c#?
How to override a function in c#?
How do I run a cshtml file?
What is namespace give the example?
what is c# command?
What do you mean by “finalize” and “finally” methods in c#?
If c# destructors are so different to c++ destructors, why did ms use the same syntax?
Can I use parseint?
What are the different types of comments in c#?
How Global.asax is used ?
How do I link two windows forms in c#?
List some of the basic string operation?
What is the signature of a method?
if you do have a stack overflow profile.what is your ranking?
Can we create multiple constructors?