title: How to save 2d shapes in c#?
body: <p>I need to save a bunch 2d shapes (defined as positioned vertices) in  2d space (x y coordinates). </p>
  
  <p>What is the best way to do it in c#?</p>
  
  <p>Right now i'm saving them as lists of vertices:</p>
  
  <pre><code>       new Shape()
          {
              X = 20, //Position of the shape's top left corner on screen
              Y = 50, //Position of the shape's top left corner on screen
              Vertices = new List&lt;Tuple&lt;float, float&gt;&gt;() //This is a square
              {
                  new Tuple&lt;float, float&gt;(0, 0),//Top left corner
                  new Tuple&lt;float, float&gt;(0, 100), //Bottom left corner
                  new Tuple&lt;float, float&gt;(100, 100),//Bottom right corner
                  new Tuple&lt;float, float&gt;(100, 0)//Top right corner
              }
          }
  
        public class Shape
        {
            public float X;
            public float Y;
            public List&lt;Tuple&lt;float, float&gt;&gt; Vertices;
        }
  </code></pre>
  
  <p>Is there some better way to do that?</p>
  
  <p>I need to be able to achieve two things with the saved shape:</p>
  
  <p>Display it on the screen on the given x y (basically like absolute positioning in css) coordinates
  And know the coordinates of each vertex in the shape</p>