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
Is it possible to have different access modifiers on the get/set methods of a property?
Name some properties of array.
what is partial assembly reference
What is ulong in c#?
What are jagged arrays used for?
Explain the difference between const and static read-only?
What is the Signification of the "new " keyword in C#? example
Value Type and Reference Type Data type in C#?
What's the difference between system.string and system.text.stringbuilder classes?
What is the use of functional interface?
Explain the difference between a struct and a class?
Can a static class have a constructor c#?
Why is aws serverless?
Which function is the entry point for a DLL in MS Windows 3.1?
In which way a two-dimensional array declared in C#?