I am using Dot Net Standard 2.0 and I am trying to get the code below but showing error Does not contain definition for Fields.
foreach (DataRow dr in dt.Rows)
{
int i= dr.Field<Int32>("Id");
}
then what to use for similar kind of requirement?
That method is an extension method that lives in DataSetExtensions library. We have a preview of it on our myget feed at https://dotnet.myget.org/feed/dotnet-core/package/nuget/System.Data.DataSetExtensions.
Most helpful comment
That method is an extension method that lives in DataSetExtensions library. We have a preview of it on our myget feed at https://dotnet.myget.org/feed/dotnet-core/package/nuget/System.Data.DataSetExtensions.