StringComparer.InvariantCultureIgnoreCase StringComparer.InvariantCultureIgnoreCase StringComparer.InvariantCultureIgnoreCase StringComparer.InvariantCultureIgnoreCase Property

定義

取得 StringComparer 物件,該物件會使用不變文化特性的字組比較規則,執行不區分大小寫字串的比較。Gets a StringComparer object that performs a case-insensitive string comparison using the word comparison rules of the invariant culture.

public:
 static property StringComparer ^ InvariantCultureIgnoreCase { StringComparer ^ get(); };
public static StringComparer InvariantCultureIgnoreCase { get; }
member this.InvariantCultureIgnoreCase : StringComparer
Public Shared ReadOnly Property InvariantCultureIgnoreCase As StringComparer

屬性值

備註

InvariantCultureIgnoreCase屬性StringComparer所傳回的會以語言相關的方式來比較字串, 以忽略大小寫, 但不適合在任何特定文化特性中顯示。The StringComparer returned by the InvariantCultureIgnoreCase property compares strings in a linguistically relevant manner that ignores case, but it is not suitable for display in any particular culture. 其主要的應用程式是以在不同文化特性中都相同的方式來排序字串。Its major application is to order strings in a way that will be identical across cultures.

CultureInfoInvariantCulture因文化特性而異, 是由屬性所傳回的物件。The invariant culture is the CultureInfo object returned by the InvariantCulture property.

屬性實際上會傳回衍生StringComparer自類別之匿名類別的實例。 InvariantCultureIgnoreCaseThe InvariantCultureIgnoreCase property actually returns an instance of an anonymous class derived from the StringComparer class.

適用於

另請參閱