title: Serialize class to XML?
body: <p>I have the follow class and the list that holds it:</p>
  
  <pre><code>public class Transport
  {
      public string TransportType { get; set; }
      public string Mode { get; set; }
      public class Coordinates
      {
          public float ID { get; set; }
          public float LocX { get; set; }
          public float LocY { get; set; }
          public float LocZ { get; set; }
          public ObjectState State { get; set; }
          public List&lt;int[]&gt; Connections = new &lt;int[]&gt;();
      }
  }
  
  public enum ObjectState
  {
      Fly,
      Ground,
      Water
  }
  
  public static List&lt;Transport&gt; Tracking = new List&lt;Transport&gt;();
  </code></pre>
  
  <p>How do I serialize the Tracking to XML ?</p>
  
  <p>I know I can use [Serializable] on the list and serialize it to file but I am not sure on how I define it to be saved as XML.</p>