title: how to use LINQ to find an object in csv file
body: <p>Hy,</p>
  
  <p>I have a csv file like that</p>
  
  <blockquote>
    <p>user_name1,c:\photo\user_photo.jpg,0,0,0,0</p>
  </blockquote>
  
  <p>in which every line refers a distinct object with own fileds separated from comma.</p>
  
  <p>How I find a particular object knowing the user name? I use distinct user_names. And after that how I make that object, curent object that I use?</p>
  
  <p>What i have done until now:</p>
  
  <pre><code>StreamReader sc = new StreamReader(@"C:\Player.csv");
  String linie = sc.ReadLine();
  while (!String.IsNullOrEmpty(linie))
  {
      string[] stringu = linie.Split(',');
      Player player = new Player(stringu[0], stringu[1], int.Parse(stringu[2]), int.Parse(stringu[3]), int.Parse(stringu[4]));
      players.Add(player);
      linie = sc.ReadLine();
  }
  sc.Close();
  var query = players.Where(a =&gt; a.Name == label6.Text);
  }
  </code></pre>
  
  <p>Sincerly,</p>