Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections.Generic;
- class Program
- {
- static void Main()
- {
- List<int> list = new List<int>();
- list.Add(2);
- list.Add(3);
- list.Add(7);
- // Loop through List with foreach.
- foreach (int prime in list)
- {
- System.Console.WriteLine(prime);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement