Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
What is the best way to iterate over a Dictionary in C#?
//Title of this code //Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { Dictionary<int, string> dic = new Dictionary<int, string>() { {5, "five"}, {6, "six"}, {7, "seven"}, {8, "eight"} }; foreach(var entry in dic) { Console.WriteLine(entry.Key+" - "+entry.Value); } } } }
run
|
edit
|
history
|
help
0
Linq
Guid Combined
Swedish regex test
Download a UTF-8 text file, and display the contents.
Expand Treeview Job Entry
List<Action>()
EvenOdd
Types
Regex fórum 01
decimal to binary