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 are delegates chosen?
Explain the steps to create satellite assembly?
What is lazy loading c#?
Difference between type constructor and instance constructor? What is static constructor, when it will be fired? And what is its use?
From a versioning perspective, what are the drawbacks of extending an interface as opposed to extending a class?
What is a strong name in c#?
What is the function of .IsDescendent()?
What is sorted list in c#?
can you create a function in c# which can accept varying number of arguments
Is learning c# hard?
Explain how do you debug an asp.net web application?
Is c and c# the same?
List the fundamental oop concepts?
What is singleordefault c#?
What is xamarin used for?