Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

What is the difference between string datatype and String class in c#?

user-image
Question ajoutée par Mohammad Riyazuddin
Date de publication: 2016/08/11
Rand Al Quraan
par Rand Al Quraan , Software QA Engineer , Propertyfinder

String : is an class (system.String) and it's an reference type (class) 

and 

string: is an alis name of String class that is created by microsoft, it's a data type, is a c# keyword and is a complier shortcut for System.String class 

so as a per above points when you use a string keyword, it reachs the System.String class , so we can say that both the (String, string ) are the same. 

 

Regardes 

Hammad Rafique
par Hammad Rafique , Software Engneer , Peak Analysis & Automation Ltd.

both are same

"string" is an alias to System.String Class

 

 

More Questions Like This