title: Linq way to find value in DataTable
body: <p>May I ask someone to help me write this in LINQ,</p>
  
  <pre><code> DataTable dt = new DataTable();
  
              DataColumn dcValue = new DataColumn();
              dcValue.ColumnName = "value";
  
              DataColumn dvDisplay = new DataColumn();
              dvDisplay.ColumnName = "display";
  
              DataColumn dvIsDefualt = new DataColumn();
              dvIsDefualt.ColumnName = "isDefalt";
  
              dt.Columns.Add(dcValue,int);
              dt.Columns.Add(dvDisplay,string);
              dt.Columns.Add(dvIsDefualt,bool);
  
              this.tipRacuna.DataSource = ds.Tables[0];
              this.tipRacuna.ValueMember = "value";
              this.tipRacuna.DisplayMember = "display";
  
              this.tipRacuna.SelectedValue =  findDefault(dt);//linq to find first value with default = true;    
  
  
          }
          private int findDefault(DataTable dtt)
              {
                  int i= 0;
  
              foreach (DataRow  dr in dtt.Rows)
              {
                  if (bool.Parse(dr["isDefalt"].ToString()))
                  {
                      return int.Parse(dr["value"].ToString());
                  }
              }
                  return i;
              }
  </code></pre>
  
  <p>As I am getting more involved in C# and programming at all, I am getting more intersting in LINQ queries.<br>
  In begins I always skip LINQ taking argument as I know TSQL no needs for another Query language, but when I see how many lines of code i can save using LINQ i start learning it.</p>