foreach index start from at 1 in c# code example
Example: foreach index start from at 1 in c#
int i = -1;
foreach (Widget w in widgets)
{
i++;
// do something
}
int i = -1;
foreach (Widget w in widgets)
{
i++;
// do something
}