Is string reference type / value type?
Answer Posted / baranee
Hi,
String is a value type but its not advisable to use for the
frequent usage of string.String is a class which has
default size of 16.If the value exceeds it will create one
more instance and left the old reference which is still not
cleared in memory. So we can use stringbuilder value type
which doubles the size when the default size exceeds.
| Is This Answer Correct ? | 1 Yes | 3 No |
Post New Answer View All Answers
how to print invert pyramid in c#
How big is an int16?
Can you drink alcohol with a loop recorder?
Can u list some style properties of List Box?
What are the steps to create an assembly and add it to the gac?
What is the difference between interface and inheritance in c#?
What is the difference between string keyword and system.string class?
What is cls, cts and clr in net?
what is difference between destruct or and garbage collection ?
What is field in c#?
What is a base class in C#?
Explain the difference between Metadata and Manifest
Can an abstract class have a constructor c#?
What I can do with c#?
What are the two kinds of properties in c#.