Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Last active March 27, 2016 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fhernd/483ab6f97678e2ae3264 to your computer and use it in GitHub Desktop.
Save Fhernd/483ab6f97678e2ae3264 to your computer and use it in GitHub Desktop.
Uso de la colección Dictionary en C#.
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