moel@324: /* moel@324: moel@344: This Source Code Form is subject to the terms of the Mozilla Public moel@344: License, v. 2.0. If a copy of the MPL was not distributed with this moel@344: file, You can obtain one at http://mozilla.org/MPL/2.0/. moel@324: moel@344: Copyright (C) 2011 Michael Möller moel@344: moel@324: */ moel@324: moel@324: using System; moel@324: using System.Collections.Generic; moel@324: moel@324: namespace OpenHardwareMonitor.Collections { moel@324: moel@324: public struct Pair { moel@324: private F first; moel@324: private S second; moel@324: moel@324: public Pair(F first, S second) { moel@324: this.first = first; moel@324: this.second = second; moel@324: } moel@324: moel@324: public F First { moel@324: get { return first; } moel@324: set { first = value; } moel@324: } moel@324: moel@324: public S Second { moel@324: get { return second; } moel@324: set { second = value; } moel@324: } moel@324: moel@324: public override int GetHashCode() { moel@324: return (first != null ? first.GetHashCode() : 0) ^ moel@324: (second != null ? second.GetHashCode() : 0); moel@324: } moel@324: } moel@324: }