title: How can I set a default value inside of a class as a property of another class?
body: <p>I need to set a property inside of a class from another class that defines the first class as a property.  I want to default a value inside the child class.  An example of this would be:</p>
  
  <pre><code>public enum NamingConvention
  {
      Name1 = 1,
      Name2
  }
  public class Class1
  {
      public Class1()
      {
      }
  
      public int Id { get; set; }
      public  NamingConvention Naming{ get; set; }
  }
  
  public class Class2
  {
      public Class2()
      {
      }
  
      public List&lt;Class1&gt; Name1s { get; set; }
  }
  
  public class Class3
  {
      public Class2()
      {
      }
  
      public List&lt;Class1&gt; Name2s { get; set; }
  }
  </code></pre>
  
  <p>I want to be able to put an attribute or something over the Class1 property inside of Class2 and Class3 so that in Class2, the Naming Property gets set to Name1 and and for Class3, it would be automatically set to Name2.</p>
  
  <p>Hope that makes sense.  I tried to make this as simple an example as possible. Any ideas out there?  I am trying to avoid abstract classes because my real entities are tied to nHibernate and don't want to change the model at this time.</p>