Plz Diffrence between String and string in C# ??
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Munesh SharmaPosted May 2, 2016, 2:38 PM
stringis an alias in C# forSystem.String. So technically, there is no difference. It's likeintvs.System.Int32.As far as guidelines, I think it's generally recommended to use
stringany time you're referring to an object.e.g.
Likewise, I think it's generally recommended to use
Stringif you need to refer specifically to the class.e.g.
Rajeesh MenothPosted Apr 9, 2016, 4:20 AM
Vivek KumarPosted Apr 8, 2016, 10:52 AM
Upendra Pratap ShahiPosted Apr 8, 2016, 9:10 AM
stringis an alias in C# forSystem.String. So technically, there is no difference. It's likeintvs.System.Int32.Rahul ChavanPosted Apr 8, 2016, 5:09 AM
String.Format("{0,10:G}: {0,10:X}", value);Nishant MittalPosted Apr 8, 2016, 3:14 AM