What does the following C# code set specify?

public static int Compare(string strA, int indexA, string strB, int indexB, int length, bool ignoreCase)

a) Comparison begins at strA[indexA] and strB[indexB] and runs for length of characters
b) Returns output > 0 for for strA > strB else < 0 for strA < strB else if strA = str B output is 0
c) Comparison is culture sensitive and if ignore case is true, comparison ignores case differences
d) All of the mentioned

1 thought on “What does the following C# code set specify?”

  1. d
    Explanation: Compares portions of the strings referred to by strA and strB. The comparison begins at strA[indexA] and strB[indexB] and runs for length characters. Returns greater than zero if strA is greater than strB, less than zero if strA is less than strB, and zero if strA and strB are equal. If ignoreCase is true, the comparison ignores case differences. Otherwise, case differences matter. The comparison is culture-sensitive.

Leave a Comment