I Have a dataTable called dt that filled from Database. the SQL Command is:
SELECT s.keyName,s.value FROM setting as s
after I fill dataTable I want to select a single value from filled dt. So I tried to do some linq that here I show:
if (dtSetting.Rows.Count > 0)
{
var r1 = (from r in dtSetting.AsEnumerable()
where r.Field<string>("keyName") == "logoName"
select r.Field<string>("value"));
MessageBox.Show(r1.ToString());
}
but I can't see the value of s.value and r1.show says that
system.data.enumerableRowCollection`1[system.String]
How can I implement this code to get a real value of the specific column?