From 38dcde42f609880700121c7089f9ab9b17dd6495 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Fri, 25 Jan 2008 15:19:12 +0000 Subject: [PATCH] Added equality and inequality operators. --- Source/OpenTK/Graphics/DisplayResolution.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Source/OpenTK/Graphics/DisplayResolution.cs b/Source/OpenTK/Graphics/DisplayResolution.cs index 3c6006c2..ebe05fd5 100644 --- a/Source/OpenTK/Graphics/DisplayResolution.cs +++ b/Source/OpenTK/Graphics/DisplayResolution.cs @@ -57,7 +57,7 @@ namespace OpenTK.Graphics #region public int BitsPerPixel /// Gets a System.Int32 that contains number of bits per pixel of this display. Typical values include 8, 16, 24 and 32. - public int BitsPerPixel { get { Debug.Print("This method is not supported currently."); return bits_per_pixel; } } + public int BitsPerPixel { get { return bits_per_pixel; } } #endregion @@ -124,5 +124,19 @@ namespace OpenTK.Graphics #endregion #endregion + + #region --- Operator Overloads --- + + public static bool operator== (DisplayResolution left, DisplayResolution right) + { + return left.Equals(right); + } + + public static bool operator !=(DisplayResolution left, DisplayResolution right) + { + return !(left == right); + } + + #endregion } }