Advertisement
Guest User

Untitled

a guest
Jan 21st, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.35 KB | None | 0 0
  1. using System.Collections.Generic;
  2.  
  3. class Program
  4. {
  5.     static void Main()
  6.     {
  7.         List<int> list = new List<int>();
  8.         list.Add(2);
  9.         list.Add(3);
  10.         list.Add(7);
  11.  
  12.         // Loop through List with foreach.
  13.         foreach (int prime in list)
  14.         {
  15.             System.Console.WriteLine(prime);
  16.         }
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement