Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- namespace CSharpConsoleApp
- {
- class MyClass
- {
- static void Main()
- {
- /*
- List<int> siyahi2 = new List<int>();
- siyahi2.Add(1);
- siyahi2.Add(2);
- siyahi2.Add(3);
- siyahi2.Add(4);
- */
- // int[] a = new int[] { 1, 2, 3, 4 };
- List<int> siyahi = new List<int> { 1, 2, 3, 4 };
- siyahi.Insert(2, 5000);
- for (int i = 0; i < siyahi.Count; i++)
- {
- Console.WriteLine(siyahi[i]);
- }
- Console.WriteLine("-------------------");
- foreach (int element in siyahi)
- {
- Console.WriteLine(element);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement