title: how to run through each class item and set value to it
body: <p>I have a class that contains some items of different datatypes.  I want to set value to each item and send it from controller to view, and view data in text boxes. </p>
  
  <p>Is it possible to loop through these the objects in the class, check the data type of it, and then assign a value to each one?</p>
  
  <p>Here's a pseudo code example of what I'm trying to accomplish</p>
  
  <pre><code>foreach item in class ItemProduction
  {
      if data type  == string 
          value of item = " " ; 
  
      if data type  == int
          value of item = 0 ; 
  
      if data type  == DAte
         value of item = date of today ;          
   }
  </code></pre>
  
  <p>Here my class definition and the objects inside it. </p>
  
  <pre><code>public class ItemProduction : Common, IDataErrorInfo, INotifyPropertyChanged
  {
      public string Main{ get; set; }
      public DateTime itemDate { get; set; }
      public string ItemType{ get; set; }
      public string productionId{ get; set; }
      public int Quantity { get; set; }
      public string Status { get; set; }
  
  }
  </code></pre>