Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List<string> list = new List<string> { "..." };
- foreach (var item in list)
- {
- Console.WriteLine(item);
- }
- List<string> list = new List<string> { "..." };
- using (List<string>.Enumerator enumerator = list.GetEnumerator())
- {
- while (enumerator.MoveNext())
- {
- string item = enumerator.Current;
- Console.WriteLine(item);
- }
- }
- IEnumerable<string> list = new List<string> { "..." };
- foreach (var item in list)
- {
- Console.WriteLine(item);
- }
- using (IEnumerator<string> enumerator = list.GetEnumerator())
Add Comment
Please, Sign In to add comment