title: ID of the First message LINQ C#
body: <p>I have a problem with Linq Expressions.
  I have a datas of txt like this.</p>
  <p>int day, int ID, string message</p>
  <pre><code>1 13
  #abor# #e#tun###agy#szel#2# #o##h#d#g ##rkasn#o#oka# #a#tunk e####a#akn##$#$#$##$$$$$$####
  1 19
  ta###t##ertunk ##gy #zel#####ok hide##f#r##sn#omo#at ##ttu## e#y patak#al$#$$$$$###$$$$$$$
  .............
  </code></pre>
  <ul>
  <li></li>
  </ul>
  <p>And I like to get the ID of the first message.
  I tried like this:</p>
  <pre><code>public static void task2()
  {
             IEnumerable&lt;Expadatok&gt; firstmessid = Expadat.First(x =&gt; x.message).ID;
             Expadatok firstmessid = Expadat.First(x =&gt; x.message).ID;
  
             Console.WriteLine($&quot;The ID of the first massage was {firstmessid}&quot;);
  }
  </code></pre>
  <p>but none of them worked.
  Data read was successful, What did I wrong?</p>