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