StringEquals Method (String, String, StringComparison) |
Determines whether two specified
String objects have the same value. A parameter specifies the culture, case, and sort rules used in the comparison.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public static bool Equals(
string a,
string b,
StringComparison comparisonType
)
Parameters
- a
- Type: SystemString
The first string to compare, or null. - b
- Type: SystemString
The second string to compare, or null. - comparisonType
- Type: SystemStringComparison
One of the enumeration values that specifies the rules for the comparison.
Return Value
Type:
Booleantrue if the value of the
a parameter is equal to the value of the
b parameter; otherwise, false.
Exceptions See Also