CompareInfo.Equals(Object) 方法

定義

判斷指定的物件是否等於目前的 CompareInfo 物件。Determines whether the specified object is equal to the current CompareInfo object.

public:
 override bool Equals(System::Object ^ value);
public override bool Equals (object value);
public override bool Equals (object? value);
override this.Equals : obj -> bool
Public Overrides Function Equals (value As Object) As Boolean

參數

value
Object

要與目前 CompareInfo 比較的物件。The object to compare with the current CompareInfo.

傳回

Boolean

如果指定的物件等於目前的 CompareInfo,則為 true,否則為 falsetrue if the specified object is equal to the current CompareInfo; otherwise, false.

備註

如果兩個 CompareInfo 物件的 LCID 和屬性相等,則會相等 NameTwo CompareInfo objects are equal if their LCID and Name properties are equal.

這個方法會覆寫 Object.EqualsThis method overrides Object.Equals.

如果安全性決策是根據字串比較或大小寫變更,您應該使用 InvariantCulture 屬性來確保不論作業系統的文化特性設定為何,行為都是一致的。If a security decision depends on a string comparison or a case change, you should use the InvariantCulture property to ensure that the behavior is consistent regardless of the culture settings of the operating system.

適用於

另請參閱