Get row number and column number for linq foreach

Posted by Oswaldlily under C# on 4/26/2016 | Points: 10 | Views : 186 | Status : [Member] | Replies : 1
I require a row number and column number to be fetched whenever error happens on certain row inside foreach.

My code goes like this:

.Where(r => r.Field<string>(columnName).Length == 0).ToList()
.ForEach(p => p.SetField<string>(columnName, " "));

My QUESTION : How to get row number and column number using this LINQ query


Posted by: Rajnilari2015 on: 4/27/2016 [Member] [Microsoft_MVP] [MVP] Platinum | Points: 25

Giving an hint: Use Select and it's overloaded method

Thanks & Regards,
RNA Team

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response