Object Design Advice - When some properties are sometimes required?
<p>I have an object, say Building, where depending on the option the User picks via the UI, certain properties are required or not via the UI form. How can I design my object so that depending on the UI option, the respective properties will be displayed with or without those required properties? </p>

<p>For example, I decorate the properties like so (C#) and for the UI option where the form does NOT NEED this field, it should not be Required and since it is "double?", i.e. nullable, it is fine if it is left null:</p>

<pre><code>[Required]
public double? Length
{
  get { return LENGTH; }
  set
  {
     Validate(value, "Length");
     LENGTH= value;
     OnPropertyChanged("Length");
   }
}
</code></pre>

<p>Any advice will be appreciated.</p>
