Quantcast
Channel: 2 questions about CompareTo() method in C# - Stack Overflow
Browsing index pages (2 articles)

2 questions about CompareTo() method in C#

I have 2 questions about the CompareTo() method in c#:I read this method compares between the letters in two strings and returns the difference between the Unicode values of the first pair of letters,...

View Article


Answer by Guru Stron for 2 questions about CompareTo() method in C#

But when I run it, it always returns -1, 0, or 1.Because the only contract string.CompareTo(string? strB) has is that it:ReturnsA 32-bit signed integer that indicates whether this instance precedes,...

View Article

Browsing index pages (2 articles)


Latest Images