What is the difference between these two declarations?
string str;
String str;
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In normal usage,
stringandStringare identical;stringis simply an alias forglobal::System.String. There are some edge-cases, though:using System;to useString– you don’t forstringclass String {}, thenStringrefers to that (this would be a silly thing to do, of course). You can’t define a class calledstring(although@stringis fine)