title: Using struct as key for dictionary and weird stuff is happening
body: <p>Heres my struct...</p>
  
  <pre><code>internal struct Coord : IEquatable&lt;Coord&gt;
  {
      public int X { get; private set; }
      public int Y { get; private set; }
  
      public Coord(int x,int y) : this(){ X = x;
          Y = y;}
  
      //Overloaded operator functuions below
      //So I can easily multiply Coords by other Coords and ints and also add Coords together
      public static Coord operator *(Coord left, int right)
      {
          return new Coord(left.X * right, left.Y * right);
      }
  
      public static Coord operator *(Coord left, Coord right)
      {
          return new Coord(left.X * right.X, left.Y * right.Y);
      }
  
      public static Coord operator +(Coord left, Coord right)
      {
          return new Coord(left.X + right.X, left.Y + right.Y);
      }
  
      public static Coord operator -(Coord left, Coord right)
      {
          return new Coord(left.X - right.X, left.Y - right.Y);
      }
  
  
      public override int GetHashCode()
      {
          int hash = 17;
          hash = hash * 31 + X;
          hash = hash * 31 + Y;
          return hash;
      }
  
      public override bool Equals(object other)
      {
          return other is Coord ? Equals((Coord)other) : false;
      }
  
      public bool Equals(Coord other)
      {
          return X == other.X &amp;&amp;
                 Y == other.Y;
      }
  }
  </code></pre>
  
  <p>I'm using these as keys for a dictionary, but I dont think they are equating to each other properly..
  The values in the dictionary are objects with a bool field.
  I have a  while loop that does stuff to them and changes the bool to true until they are all true.. It gets stuck in an infinite loop as they never get changed to true.. Whats weird is that I dont get any out of range errors or anything like that and when I debug the bit where the bool is changed it seems to work fine but when I look at the dictionary in debug all the bools are still false</p>
  
  <p>(note: i was using a Tuple as the key but I made this struct so I could multiply and add them easily )</p>
  
  <p>I just want to check with you that...</p>
  
  <pre><code>  _myDictionary = new Dictionary&lt;Coord, RogueRoom&gt;();
    _myDictionary[new Coord(4,5)] = new RogueRoom();
    _myDictionary[new Coord(4,5)].Connected = true
  </code></pre>
  
  <p>Those two times I access the dictionary I am accessing the same value object?</p>
  
  <p>EDIT: Here is the value struct in the dictionary (I replaced "thing" above)</p>
  
  <pre><code>internal struct RogueRoom
  {
      public Room RoomField;
      public bool Connected;
      public Rectangle Realpos;
      public Color[] RogueRoomColors;
      public Coord Gridpos;
  }
  </code></pre>