เมธอด Object.GetHashCode() ใน C# ใช้คืนค่า hash code (รหัสแฮช) ของอ็อบเจ็กต์ — ใช้เป็นค่าเริ่มต้นสำหรับ hash-based collections เช่น Dictionary, HashSet, Hashtable ไวยากรณ์ (Syntax) public virtual int GetHashCode(); ตัวอย่างที่ 1: GetHashCode ของ Object และ String using System; public class Demo {