Answer: Foreach loop is an alternative of For Loop.
We get the same output with Foreach loop as with For Loop
For Example:-
foreach(string values in arr_list)
{
MessageBox.Show(values);
}
Where arr_list is an ArrayList.
Asked In: Many Interviews |
Alert Moderator