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:
00975413
Views:
14
>Bonnie,
>
>So C# doesn't implement < , >, < =, >= operators for strings? That was pretty standard in C++ so it's odd that C# doesn't have them.

df,

PMFJI. First, I agree with you wholeheartedly. However, I think that the thinking on this in the design of .NET is what led to this.

As you know, there're no "simple variables" in .NET. IOW, everything's an object. The standard C/C++ method of declaring, say, an integer applies, but it really isn't an integer, but an object. As a result, the standard comparison operators don't apply.

Hope you and your's had a happy holiday season.

Best Always.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform