Question: write the code C# Define a method that takes two string arguments and returns bool. In the method body, compare the two strings to see
write the code C# Define a method that takes two string arguments and returns bool.
In the method body, compare the two strings to see if they are the same.
Remove case sensitivity from the comparison by using the ToUpper or the ToLower method.
If the strings are a match, return true; if not, return false.
Call the method from Main and pass string values that match words but not case, egHello and hello
Verify that true is returned in this case and output this information to the console in an appropriate message.
Call the method a second time with two strings that do not match. If the comparison returns false as expected, display an appropriate output message for the false case.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
