0
foreach is mainly just for arrays. right?
3 RĂ©ponses
+ 2
nope absolutely not! There are often classes with the IEnumerable interface for example the List<T> where you use either LINQ or foreach for a good readable code
0
no foreach used for eny thing consist more than one and you want to make an operation on all them in one step so that use foreach
0
no, foreach is used whenever you need to go thru all items, like values, words, rows in files etc.