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



What is the minimum size (in bytes) of string data type in c#? Give its compatible data type in .NE..

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

What is the minimum size (in bytes) of string data type in c#? Give its compatible data type in .NE..

Answer / harikrishna

2bytes

Is This Answer Correct ?    7 Yes 1 No

What is the minimum size (in bytes) of string data type in c#? Give its compatible data type in .NE..

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

What is the minimum size (in bytes) of string data type in c#? Give its compatible data type in .NE..

Answer / mohan

12 bytes

Is This Answer Correct ?    1 Yes 3 No

What is the minimum size (in bytes) of string data type in c#? Give its compatible data type in .NE..

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

Post New Answer

More C Sharp Interview Questions

How big is int16?

0 Answers  


What is a string? What are the properties of a string class?

1 Answers  


difference between keyword internal and protected?

5 Answers   HCL,


Could you explain the difference between func vs action vs predicate?

0 Answers  


Give examples for reference types?

0 Answers  






How do you remove white spaces from a string?

0 Answers  


What is difference between class and interface in c#?

0 Answers  


What is delegate in c#?

0 Answers  


So let's say I have an application that uses myapp.dll assembly, version 1.0.0.0. There is a security bug in that assembly, and I publish the patch, issuing it under name myapp.dll 1.1.0.0. How do I tell the client applications that are already installed to start using this new myapp.dll?

0 Answers  


How does dll hell solve in .net?

0 Answers  


Is std :: string null terminated?

0 Answers  


Using system; class main { public static void Main() { int a = 1; for (int i = 0; i < 10; i++) { int j = a * 5; Console.WriteLine(a + "*5=" + j); a++; } Console.ReadLine(); } }

1 Answers  


Categories