Advertisement
Fhernd

UsoDictionary.cs

Mar 27th, 2016
18,655
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.76 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. namespace Articulos.Pregunta.P1920
  5. {
  6.     public class UsoDictionary
  7.     {
  8.         public static void Main()
  9.         {
  10.             Dictionary<string, string> apertura = new Dictionary<string, string>();
  11.            
  12.             // Asociación archivos:
  13.             apertura.Add("png", "SnagIt Editor");
  14.             apertura.Add("txt", "Notepad++");
  15.             apertura.Add("html", "Google Chrome");
  16.             apertura.Add("docx", "Microsoft Word");
  17.            
  18.             foreach(KeyValuePair<string, string> kvp in apertura)
  19.             {
  20.                 Console.WriteLine ("La extensión `{0}` está asociada con `{1}`.",
  21.                     kvp.Key, kvp.Value);
  22.             }
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement