What\'s the difference between String and string?

Answer

string is an alias for System.String. So technically, there is no difference. It's like int vs. System.Int32.

As far as guidelines, I think it's generally recommended to use string any time you're referring to an object.

e.g.

string place ="world";

Likewise, I think it's generally recommended to use String if you need to refer specifically to the class.

e.g.

string greet =String.Format("Hello {0}!", place);

All windows Questions

Ask your interview questions on windows

Write Your comment or Questions if you want the answers on windows from windows Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---