IRONSOFTWAREHOME
Get Hash Code
using IronSoftware.Drawing;
using System;

PointF pointFloat = new PointF(22.2f, 25.7f);

int hashCode = pointFloat.GetHashCode();

// Output hash code value of this point
Console.WriteLine(hashCode);
NuGet Download
PM > Install-Package IronSoftware.System.Drawing
Get Hash Code

Get Hash Code

Another method available in the Point and PointF classes in IronDrawing is the GetHashCode() method. A hash code is a numerical value that represents the identity of an object in a unique way, such as a Point. Hash codes are typically used in dictionaries, hash sets, and hash tables to facilitate object equality and hashing operations.

To obtain the hash code of a Point, simply call the GetHashCode() method on an instantiated Point or PointF object. The method returns a System.Int32 object which can be printed or stored.

Both the GetHashCode() and Equals() methods can be used to compare the equality of two points. However, the Equals() method provides direct results for equality checks, whereas the GetHashCode() method is mainly used to obtain the hash code of a point, which is then used in data structures like dictionaries or hash tables.

View on GitHub

Ready to Get Started?

Nuget Downloads 19,661,086Version:2025.3just released

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required