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

What is a class c#?

0 Answers  


What is msil in c#?

0 Answers  


What is regex replace in c#?

0 Answers  


Will finally block get executed if the exception had not occurred?

2 Answers  


What does exclamation mark mean in access query?

0 Answers  






How encapsulation and abstraction defined/used in C#.NET.

8 Answers   Synechron,


Why are strings immutable in c#?

0 Answers  


what are the contents of an assembly ?

0 Answers  


how to access the virtual method without creating the objet for the virtual method?

1 Answers  


Which is better javascript or c#?

0 Answers  


How do I start a program in c#?

0 Answers  


what are the events in delegate?

2 Answers   Choice Solutions,


Categories