https://www.youtube.com/watch?v=561J5sYWCEQ&list=PLO56HZSjrPTB4NxAsEP8HRk6YKBDLbp7m&index=48
> using System.Collections;
> Stack stack = new Stack();
> stack.Push(100);
> stack.Push(200);
> stack.Pop();
200
> using System.Collections;
> using System.Collections.Generic;
> Stack<int> stack = new Stack<int>();
> stack.Push(100);
> stack.Push(200);
> stack.Pop();
200
> using System.Collections;
> using System.Collections.Generic;
> List<int> numbers = new List<int>();
> numbers.Add(10);
> numbers.Add(20);
> foreach(int number in numbers)
. {
. Console.WrietLine(number);
. }
10
20
> using System.Collections;
> using System.Collections.Generic;
> List<int> numbers = new List<int>();
> Enumerable.Range(1, 10)
RangeIterator { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }
> Enumerable.Repeat(1, 10)
RangeIterator { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
> numbers.AddRange(Enumerable.Range(1, 10));
> numbers
List<int>(10) { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }
> using System.Collections;
> using System.Collections.Generic;
> Dictionary<int, string> todos = new Dictionary<int, string>();
> todos.Add(1, "C#");
> todos.Add(2, "ASP.NET");
> todos.Add(3, "...");
> todos
Dictionary<int, string>(3) { {1, "C#" }, {2, "ASP.NET"}, {3, "..."} }
> foreach(var item in todos)
. {
. Console.WrietLine($"{item.Key} - {item.Value}");
. }
1 - C#
2 - ASP.NET
3 - ...