Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
String versus String,xxx
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 3.0
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01460651
Message ID:
01460887
Views:
30
>I was a bit confused about string and String. I see now that "string" is used to declare a string variable, whereas "String" originates from a class, and is used to do formatting, but from which class? as in String.Format().

BTW - they're the same class (so it doesn't matter). You can write code like this and it's all equivalent:
string myString = "Hello";
System.String myString = "Hello";

string format = string.Format("{0} there.", myString);
string format = String.Format("{0" there.", myString);
System.String format = string.Format("{0} there.", myString);
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Reply
Map
View

Click here to load this message in the networking platform