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 string nullable in c#?
What is object type in c#?
What is the purpose of constructor in c#?
Is nullable type c#?
Does c# support try-catch-finally blocks?
What is .net console?
What is the difference between hashtable and dictionary?
What exactly is serverless?
What does void mean in c#?
Define multicast c# delegate?
What is difference between ilist and list?
What is generic and non generic collections in c#?
Is unboxing an implicit conversion?
What is the .net datatype that allows the retrieval of data by a unique key?
What is difference between method and function in c#?