- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text.RegularExpressions;
- namespace ForgetCode
- {
- public class MainClass
- {
- public static void Main()
- {
- // Model 1
- int[] myArray1 = new int[5];
- myArray1[0] = 10;
- myArray1[1] = 20;
- myArray1[2] = 30;
- myArray1[3] = 40;
- myArray1[4] = 50;
- foreach (int i in myArray1)
- {
- Console.WriteLine(i);
- }
- // Model 2
- int[] myArray2 = {1,2,3,4,5};
- foreach (int i in myArray2)
- {
- Console.WriteLine(i);
- }
- }
- }
- }
- 10
- 20
- 30
- 40
- 50
- 1
- 2
- 3
- 4
- 5