From 1a1e7613263abe1f79be06b8bad624bed219a242 Mon Sep 17 00:00:00 2001 From: "H. Utku Maden" Date: Sat, 14 Dec 2024 19:43:50 +0300 Subject: [PATCH] Add custom hashcode to SolidBrush. --- Dashboard.Drawing/SolidBrush.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Dashboard.Drawing/SolidBrush.cs b/Dashboard.Drawing/SolidBrush.cs index 1273653..929ef74 100644 --- a/Dashboard.Drawing/SolidBrush.cs +++ b/Dashboard.Drawing/SolidBrush.cs @@ -1,4 +1,5 @@ -using System.Drawing; +using System; +using System.Drawing; namespace Dashboard.Drawing { @@ -22,6 +23,11 @@ namespace Dashboard.Drawing { Color = color; } + + public override int GetHashCode() + { + return HashCode.Combine(Kind, Color); + } } public class SolidBrushExtension : DrawExtension