What is the minimum size (in bytes) of string data type in c#?
Give its compatible data type in .NET Framework.
Answers were Sorted based on User's Feedback
Answer / dileep
A string type takes 4 bytes (A string is a referenc type)
Bcoz either it references a null value or a non-null value
since it is a reference type which holds the address of a
memory location it occupies the size of an integer (which
is 4 bytes in c#).
Is This Answer Correct ? | 7 Yes | 0 No |
Answer / paresh nawale
dileep is right.
as string is refrence type it need 4 bytes to hold memeory
address.
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / ganesh
sorry harikrishna. ur answer is wrong.
by default the size of a string is 0 bytes.we can have a
null string in c#.
Is This Answer Correct ? | 2 Yes | 5 No |
What is the default value of object in c#?
Why do we need singleton pattern in c#?
If a class derives from another class, will the derived class automatically contain all the public, protected, and internal members of the base class?
What is the difference between class and namespace?
what is the difference between the debug class and trace class?
What are constants in c#?
What are satellite assemblies?
Can an interface extend a class c#?
What are the differences between system.string and system.text.stringbuilder classes?
Can you override private virtual methods?
What tool we have to use to install assembli in gac folder.
Can abstract class have parameterized constructor?