StringEquals Method (String, StringComparison) |
Determines whether this string and a specified
String object 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 bool Equals(
string value,
StringComparison comparisonType
)
Parameters
- value
- Type: SystemString
The string to compare to this instance. - comparisonType
- Type: SystemStringComparison
One of the enumeration values that specifies how the strings will be compared.
Return Value
Type:
Booleantrue if the value of the
value parameter is the same as this string; otherwise, false.
Exceptions See Also