Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
String versus String,xxx
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 3.0
Database:
Visual FoxPro
Divers
Thread ID:
01460651
Message ID:
01460887
Vues:
31
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform