hello,
i have following linq query which return all country.
i want only the first row countryid to be bind with label, i do not want to use for each loop
please advice
Use FirstOrDefault method.
DataRow dr = dt.AsEnumerable().Where(dr => dr["Id"] == 1).FirstOrDefault();
© COPYRIGHT 2024 ASPSnippets.com ALL RIGHTS RESERVED.