title: implementing a c# interface
body: <p>I have a dataTable called myResult which has tw columns Process and ParentProcess and I am trying to put this into an Ienumerable type so I can serialise it with Json.net.</p>
  
  <p><a href="https://stackoverflow.com/questions/20846897/serialise-a-c-sharp-datatable-with-a-hierarchy-as-json-heirachy">Original post is here:</a></p>
  
  <p>Now I am up to this point, I have this interface:</p>
  
  <pre><code>namespace myFirstCProgramIn2013
      {
          public interface Interface1 : IEnumerable
          {
              string Process { get; set; }
              string ParentProcess { get; set; }
          }
      }
  </code></pre>
  
  <p>I have implemented it in this class:</p>
  
  <pre><code>public class myArray : Interface1
  {
  
      public string Process
      {
          get
          {
              throw new NotImplementedException();
          }
          set
          {
              throw new NotImplementedException();
          }
      }
  
      public string ParentProcess
      {
          get
          {
              throw new NotImplementedException();
          }
          set
          {
              throw new NotImplementedException();
          }
      }
  
      public System.Collections.IEnumerator GetEnumerator()
      {
          throw new NotImplementedException();
      }
  }
  </code></pre>
  
  <p>I have then tried to use this class to assign myResult to it using the code below:</p>
  
  <pre><code>   List&lt;Interface1&gt; recordList = new List&lt;Interface1&gt;();
     if (myResult.Rows.Count &gt; 0)
     {
         foreach (DataRow row in myResult.Rows)
         {
             var myArray = new myArray();
             myArray.Process = Convert.ToString(row["Process"]);
             myArray.ParentProcess = Convert.ToString(row["ParentProcess"]);
  
         }
     }
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>An exception of type 'System.NotImplementedException' occurred in
    App_Web_hi4zxnmq.dll but was not handled in user code</p>
  </blockquote>
  
  <p>which is thrown at the set clause of the Process Property of myArray Class.</p>
  
  <p>Where am I going wrong with this?
  Thanks.</p>