Padding.GetHashCode 方法


產生目前 Padding 的雜湊程式碼。Generates a hash code for the current Padding.

 override int GetHashCode();
public override int GetHashCode ();
override this.GetHashCode : unit -> int
Public Overrides Function GetHashCode () As Integer


32 位元帶正負號的整數雜湊碼。A 32-bit signed integer hash code.


GetHashCode 方法會使用 RightLeftTopBottom 值來產生32位雜湊碼,代表目前的 PaddingThe GetHashCode method uses the Right, Left, Top, and Bottom values to generate a 32-bit hash code that represents the current Padding.

雜湊碼是對應至物件值的數位(因此,具有相同值的兩個物件應該會產生相同的雜湊碼)。A hash code is a number that corresponds to the value of an object (so two objects that have the same value should generate the same hash code). 雜湊碼用於排序和儲存物件的集合。Hash codes are used to sort and store collections of objects. 例如,System.Collections.Hashtable 代表索引鍵/值組的集合,這些組合是根據索引鍵的雜湊碼來組織。For example, a System.Collections.Hashtable represents a collection of key-and-value pairs that are organized based on the hash code of the key.

如需雜湊程式碼和雜湊函式的詳細資訊,請參閱 Object.GetHashCode 方法。For more information on hash codes and hash functions, see the Object.GetHashCode method.