title: Convert or map a class instance to a list of another one by using Lambda or LINQ?
body: <p>I have the following two classes:</p>
  
  <pre><code>class MyData {
    public List&lt;string&gt; PropertyList { get; private set;}
    public string PropertyB { get; set; }
    public string PropertyC { get; set; }
  }
  
  class MyData2 {
    public string PropertyA { get; set;}
    public string PropertyB { get; set; }
    public string PropertyC { get; set; }
  }
  </code></pre>
  
  <p>If I have an instance of MyClass, I need to convert it to a list of MyData2. I could do it by looping MyData.PropertyList and caching other property values and inserting them to a list of MyData2 like this:</p>
  
  <pre><code>string propertyB = myData.PropertyB;
  string propertyC = myData.PropertyC;
  List&lt;MyData2&gt; myData2List = new List&lt;MyData&gt;();
  foreach(string item in myData.PropertyList)
  {
    myData2List.Add(new myData2() { item, propertyB, propertyC });
  }
  </code></pre>
  
  <p>Not sure if this can be done with .Net 3.5 features of LINQ or Lambda expression?</p>