StringComparer.FromComparison(StringComparison) 方法

定义

将指定的 StringComparison 实例转换为 StringComparer 实例。Converts the specified StringComparison instance to a StringComparer instance.

public:
 static StringComparer ^ FromComparison(StringComparison comparisonType);
public static StringComparer FromComparison (StringComparison comparisonType);
static member FromComparison : StringComparison -> StringComparer
Public Shared Function FromComparison (comparisonType As StringComparison) As StringComparer

参数

comparisonType
StringComparison

一个要转换的字符串比较器实例。A string comparer instance to convert.

返回

一个 StringComparer 实例,它表示指定的 StringComparison 实例的等效值。A StringComparer instance representing the equivalent value of the specified StringComparison instance.

异常

指定的字符串比较不受支持。The specified string comparison is not supported.

适用于