"for each "と ”for eah row"の違い:It is about the difference between "for each" and "for eah row"

"for each "と ”for eah row"の違いに関してです。
自分の認識です。
"for each"は、指定された回数だけ同じ処理を繰り返す。
"for each row"は、配列の内容を特定して同じ処理を繰り返す。
お互いよく似た処理と考えています。
しかし、どのような事象で使い分けすべきか今一つ理解度が不足しています。
この点、ご教示お願いします。

It is about the difference between “for each” and “for eah row”.
It is my own recognition.
“for each” repeats the same process for the specified number of times.
“for each row” specifies the content of the array and repeats the same process.
I consider it to be processing similar to each other.
However, what kind of event should be used properly is not enough.
In this regard, please teach.

The biggest difference it that the ‘For Each Row’ is specially designed for iterating through rows of DataTable whereas ‘For Each’ can interate through any kind of variables type as per the TypeArgument property that you set. Hence if you are dealing with DataTable use ‘For Each Row’ and if you want to iterate through any collection/list of other types then use ‘For Each’ and change the type accodingly.

Let me know if that helps.

Thanks,
Rammohan B.

1 Like

Thank you very much.
I could understand “for each for”.
I usually use “for each”.
However, there is no level that can be explained to other people.
I am short of studying.
Please tell me more about “collection / list of other types then use ‘For Each’ and change the type accountingly”.

Pardon me!