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:
00975141
Views:
14
>You have the right idea, but the keyword int is equal to System.Int32 and you convert it using Conver.ToInt16 and the max value for Int16 is 32767. Use Conver.ToInt32 instead:

Thanks, both.

Converting to an integer happens to work in this scenario, because both character strings are numeric.

However, what if either string contained letters. How would they be compared in C#?

TIA, Kevin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform