Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How Do You Compare Strings In C#?
Message
De
10/01/2005 08:36:00
 
 
À
07/01/2005 12:08:29
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
00975060
Message ID:
00975621
Vues:
10
Hi Bonnie,

>If I recall correctly, I had given you sorter compare code for dates, because that's what you were trying to sort at the time. Off the top of my head, I don't remember why it didn't work for you, but anyway, comparing

We never did find out why. So I tried to work around the problem by sorting on what would be the equivalent to VFP's DTOS() function.

>
>	return string.Compare(s1, s2);
>}
>
That's what I was looking for, or at least this ordered them oldest first. I figured that since Intellsense suggests that this returns an integer, multiplying by -1 would give me what I was originally aiming for - reverse date order. And it worked!!!

Thanks very much for your help and patience over the weeks (and thanks to everybody else who also contributed).

Mind you, I am now starting to see why people have asked for VFP.NET...

Kevin
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform