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

Hello! How to do this: "Create manifest utility intended for creating update content files. Application should take a set of files as input parameter and generate XML based manifest file as output one." I use C# and vs.net 2003. It's urgent! Help please, thanks. Mayana

1 Answers  


What are the advantages of interface in c#?

1 Answers  


What is inheritance in csharp?

1 Answers  


What is autopostback in c#?

1 Answers  


what is the difference between arraylist and hash table using a simple program?

3 Answers   CGI, Polaris, SunGard,


What is ulong in c#?

1 Answers  


What is tpl in c#?

1 Answers  


What is internal and protected-internal accessspecifier in c#.net?

1 Answers  


Can we have two main methods in c#?

1 Answers  


How to open a new form on button click in Windows forms?

1 Answers   Viscus Infotech,


How do you access a constant field declared in a class?

1 Answers  


Error handling and how this is done ?

2 Answers   Digital GlobalSoft,


Categories