Collections
Collections
using System;
using System.Text;
using System.Collections.Generic;
using System.Collections;
namespace Developers
{
class Program
{
static void Main(string[] args)
{
Dictionary<string, string> openWith = new Dictionary<string, string>();
openWith.Add("txt", "notepad.exe");
openWith.Add("bmp", "paint.exe");
openWith.Add("dib", "paint.exe");
openWith.Add("rtf", "wordpad.exe");
Console.WriteLine(new string('*',20));
List;
using System;
using System.Text;
using System.Collections.Generic;
using System.Collections;
namespace Developers
{
class Program
{
static void Main(string[] args)
{
List<double> numbers = new List<double>();
numbers.Add(10.34);
numbers.AddRange(new double[4] { 1.34, 45.67,11.234, 123.5});
Console.WriteLine(numbers.Count);
Console.WriteLine(numbers.Contains(1.34));
numbers.Remove(10.34);