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 c# the same as d flat?
What is datetime minvalue in c#?
Can we overload the main method in c#?
What is a datacontract?
What is .edmx file?
What is a void c#?
What is asynchronous one-way calls?
What is the difference between continue and break statement?
What are class fields?
State two different types of access modifiers.
What is use of private class in c#?
Why are strings immutable c#?
What is c# in asp net?
Is collection a data structure?
What is the benefit of dependency injection c#?