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
Which controls do not have events?
What is Inheritance in C#?
What is the difference between throw and throw ex?
How do I start a program in c#?
Why abstract class is not instantiated in c#?
What Happens In Memory When You Box And Unbox A Value-type?
Why delegates are required?
What is ControlBox Propertie
Which sorting algorithm is best?
What is the process of delegation?
What is type system in c#?
Which is faster abstract class or interface in c#?
Who is a accessibility modifier “protected internal†available to ?
What is msil, and why should developers need an appreciation of it if at all?
Why do we use reflection in c#?