string is alias to String class nothing more nothing less.
Which is a sealed class
Interviews12 answers
What is the difference between string and String in c#?
12 Answers
Ishoo AnyalPosted Sep 27, 2019, 2:57 AM EDT
“string” is a datatype, whereas “String” represents a class. “string” is an alias for System.String. At execution time both are compiled to the same code. One more difference is the syntax highlighter
srinivas raoPosted Sep 3, 2019, 3:45 AM EDT
string is a reserved word, but String is just a class name.
Bidyasagar MishraPosted Aug 3, 2019, 8:49 PM EDT
String is an object
But string is a variable
Md SarfarajPosted Feb 18, 2019, 5:50 PM EST
String is a object and string is a variable
Md SarfarajPosted Jan 25, 2019, 5:04 AM EST
String is class while string is structure
Mukesh KumarPosted Jan 25, 2019, 4:21 AM EST
We can say both the string and String are same. Even if we can also say string is an alias name of String. But when we use String then we Should include "using System" Namespace otherwise it will generate an Error.Whenever, we hover the mouse on both string and String then it will Show that it comes under System namespace.
Salman BegPosted Jan 19, 2019, 1:49 AM EST
In C#, string is an alias for the String class in .NET framework.
Sneha ReddyPosted Dec 19, 2018, 9:41 PM EST
Both results same.
Sreekanth ReddyPosted Nov 25, 2018, 6:16 PM EST
Technically no difference, further please flow below link.
https://stackoverflow.com/questions/7074/what-is-the-difference-between-string-and-string-in-c
Naveen BishtPosted Nov 19, 2018, 1:11 AM EST
string is an alias for the String class in .NET framework
Rashmiranjan DalabeheraPosted Nov 15, 2018, 12:24 AM EST
" System.String " a.k.a "String" ( capital "S") is a .NET framework data type while "string" is a C# data type. In short "String" is an alias ( the same thing called with different names) of "string". So technically both the below code statements will give the same output.
Vipin SoniPosted Nov 14, 2018, 12:17 AM EST









