title: C# Property with Generic Type
body: <p>I have a class:</p>
  
  <pre><code>public class class1
  {
  public string Property1 {get;set;}
  public int Property2 {get;set;}
  }
  </code></pre>
  
  <p>Which will be instantiated:</p>
  
  <pre><code>var c = new class1();
  c.Property1 = "blah";
  c.Property2 = 666;
  </code></pre>
  
  <p>So bear with me (I am new to generics), I need another class with a property of a generic type so that Property1 or Property2 can be used to set Property3:</p>
  
  <pre><code>public class Class2
  {
  public GenericType Property3 {get;set;}
  }
  </code></pre>
  
  <p>I want to be able to:</p>
  
  <pre><code>var c2 = new class2();
  c2.Property3 = c1.Property2 // Any property of any type.
  </code></pre>