How to assign datatable value to a field in the list
Hi friends,
I am assigning values in the list
{
Name=item.field("name"),
Date=dt.AsEnumerable()
.where(y=>y.field("name")=field("name"))
.Select(x=>x.field("date")).To list()
}
But the value is not assigning to the variable and showing system.datarowLinq...text in the output.
I am getting cannot convert string[] to string
I tried.ToString(),First() and firstorDefault()
But I am unable to assign value Mar-2020 to the variable.
How to get the correct value in the variable?
Laxmidhar SahooRank #383 · 6.6K reputationPosted Aug 20, 2020, 10:00 AM EDT
prasanna pRank #3,234 · 443 reputationPosted Aug 21, 2020, 3:40 AM EDT
Navaneeth KrishnanRank #1,172 · 1.5K reputationPosted Aug 22, 2020, 5:40 AM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Aug 19, 2020, 6:59 PM EDT
prasanna pRank #3,234 · 443 reputationPosted Aug 20, 2020, 8:51 AM EDT
Laxmidhar SahooRank #383 · 6.6K reputationPosted Aug 21, 2020, 9:10 PM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts