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 an extension method in c#?
In Main function another function is there and to that function if we pass string as parameter ,then that string value is passed by value or reference type?
Is c# used for frontend or backend?
How cache is implemented in web application for DB queries?
What is enumerable in c#?
Why do we need interfaces in c#?
What is check/uncheck?
In .NET which is the smallest unit of execution?
Explain the advantage of using system.text.stringbuilder over system.string?
int a = '3' + '4'; char n = (char)a; What will be answer of n?
What is the use of giving more than one CATCH BLOCK in one TRY block? Directly we can give that catch(Exception e)?Why we go for arrayoutofbound Exception,divided by zero etc..? Explain
if we are updating a database using thread, and mean while application crashes or thread being aborted then what will happen in Database? Rollback or Database will be updated? Please explain with different scenario.
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)