title: Generic List data insert in C#
body: <p>I just want to insert some data from a datatable to a list.</p>
  
  <p>Here is my class:</p>
  
  <pre><code>class WhereColumnValue
  {
      private string columnName;
  
      public string _columnName
      {
          get { return columnName; }
          set { columnName = value; }
      }
  
      private string setValue;
  
      public string _setValue
      {
          get { return setValue; }
          set { setValue = value; }
      }
  
      private bool setValueStatus;
  
      public bool _setValueStatus
      {
          get { return setValueStatus; }
          set { setValueStatus = value; }
      }
  }
  </code></pre>
  
  <p>Now i have a list of WhereColumnValue type.</p>
  
  <pre><code>List&lt;WhereColumnValue&gt; lstWhereColumnValue = new List&lt;WhereColumnValue&gt;();
  </code></pre>
  
  <p>How could I insert data to this lstWhereColumnValue?</p>
  
  <p>I have tried following code:</p>
  
  <pre><code>foreach (DataRow tmp in dtAllColumnData.Rows)
              {
                  lstColumn.Add(tmp["COLUMN_NAME"].ToString());
                  lbTableColumns.Items.Add(tmp["COLUMN_NAME"]);
                  lstWhereColumnValue.Add(***);
  
              }
  </code></pre>
  
  <p>I have to add an item here(<em>*</em>). but i only have value for _columnValue. Rest two will remain null. how would i do this?</p>