C#: Demonstrate Compare method is equivalent to using ToUpper or ToLower when comparing strings
Write a C# Sharp program to demonstrate that the Compare(String, String, Boolean) method is equivalent to using ToUpper or ToLower when comparing strings.

Sample Solution:-
C# Sharp Code:
Sample Output:
Comparing 'QRS' and 'qrs': The Strings are equal when capitalized? true The Strings are equal when case is ignored? true
Flowchart :
C# Sharp Code Editor:
Improve this sample solution and post your code through Disqus
Previous: Write a C# Sharp program to compares four sets of words by using each member of the StringComparison enumeration. The comparisons use the conventions of the English (United States) and Sami (Upper Sweden) cultures.
Next: Write a C# Sharp program to demonstrate how culture can affect a comparison.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.