Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How Do You Compare Strings In C#?
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
00975060
Message ID:
00975703
Views:
15
Of course
	return string.Compare(s2, s1);
should also reverse the order of the sort.

>
>>
>>	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!!!
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform