Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How Do You Compare Strings In C#?
Message
De
07/01/2005 09:14:26
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
How Do You Compare Strings In C#?
Divers
Thread ID:
00975060
Message ID:
00975060
Vues:
65
I Have gone back to the ArrayList sorting problems I had a couple of weeks ago, and implemented the workaround of a sort of C# equivalent to VFP's DTOS(). However, the following line fails to compile:
if (d1 < d2) {return -1;}
with error "Operator '<' cannot be applied to operands of type 'string' and 'string'". d1 and d2 are both strings in the format "20041104" and "20041130". So how should I be testing if d1 is less than d2?

TIA, Kevin
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform