Skip to content

Commit

Permalink
python product???
Browse files Browse the repository at this point in the history
  • Loading branch information
nameofSEOKWONHONG committed Oct 3, 2024
1 parent fe2cb8d commit d3e6bb9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/XForEachExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,5 +170,17 @@ await Parallel.ForEachAsync(items, options, async (item, token) =>

return isCancel;
}

public static void xForEach<T1, T2, T3>(this T1[] item1, T2[] item2, T3[] item3, Action<T1, T2, T3> action)
{
if(item1.Length < item2.Length ||
item1.Length < item3.Length)
throw new Exception("item are not same length");

for (var i = 0; i < item1.Length; i++)
{
action(item1[i], item2[i], item3[i]);
}
}
}
}

0 comments on commit d3e6bb9

Please sign in to comment.