Question: You can use theoperator to compare two strings for example: if (password abcd') which would check whether the variable string called password is equal to

 You can use theoperator to compare two strings for example: if

You can use theoperator to compare two strings for example: if (password "abcd') which would check whether the variable string called password is equal to the string "abcd" In addition to determining whether strings are equal or not equal, you can use the String.Compare method to determine whether one string is greater than or less than another string. This is a useful capability because sometimes you need to sort strings in some order. In the general format, string and string2 are the strings that are being compared. The method returns an integer value indicating the result of the comparison. The integer value will be one of the following: Greater than zero if stringi is greater than string2 Zero if stringi is equal to string2. Less than zero if string1 is less than string2. . . For example if (string. Compare("Mike, "Kerry) 0)Choose ] if sally-Sally" Choose 20

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!