Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace DictionariesDemo
- {
- class DictionariesDeemo
- {
- static void Main()
- {
- int[] arr = new int[] { 30, 40, 50 };
- for (int i = 0; i < arr.Length; i++)
- {
- Console.WriteLine("postion -> {0} - element -> {1}", i, arr[i]);
- }
- Console.WriteLine();
- SortedDictionary<string, int> demos = new SortedDictionary<string, int>();
- demos["pesho"] = 30;
- demos["gosho"] = 40;
- demos["kiro"] = 500;
- demos["gosho"] = 2000;
- demos.Remove("gosho");
- if (demos.ContainsKey("kiro"))
- {
- Console.WriteLine(demos["kiro"]);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment