Last active
March 27, 2016 16:35
-
-
Save Fhernd/483ab6f97678e2ae3264 to your computer and use it in GitHub Desktop.
Uso de la colección Dictionary en C#.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
namespace Articulos.Pregunta.P1920 | |
{ | |
public class UsoDictionary | |
{ | |
public static void Main() | |
{ | |
Dictionary<string, string> apertura = new Dictionary<string, string>(); | |
// Asociación archivos: | |
apertura.Add("png", "SnagIt Editor"); | |
apertura.Add("txt", "Notepad++"); | |
apertura.Add("html", "Google Chrome"); | |
apertura.Add("docx", "Microsoft Word"); | |
foreach(KeyValuePair<string, string> kvp in apertura) | |
{ | |
Console.WriteLine ("La extensión `{0}` está asociada con `{1}`.", | |
kvp.Key, kvp.Value); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment