Click or drag to resize
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: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
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: Boolean
true if the value of the a parameter is equal to the value of the b parameter; otherwise, false.
Exceptions
ExceptionCondition
ArgumentExceptioncomparisonType is not a StringComparison value.
See Also