Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How Do You Compare Strings In C#?
Message
From
10/01/2005 09:56:43
 
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
00975060
Message ID:
00975642
Views:
14
Hey Kevin,

I'm glad I could help. Hope you're having fun. =)

~~Bonnie



>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
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform