Skip to content

Instantly share code, notes, and snippets.

@vereperrot
Created December 1, 2015 10:10
Show Gist options
  • Save vereperrot/cd50ed361e9c2db7ec79 to your computer and use it in GitHub Desktop.
Save vereperrot/cd50ed361e9c2db7ec79 to your computer and use it in GitHub Desktop.
class Program
{
static void Main(string[] args)
{
var dictionary = new Dictionary<string, int>()
{
{"1", 1}, {"2", 2}, {"3", 3}
};
string[] keyArray = new string[dictionary.Keys.Count];
dictionary.Keys.CopyTo(keyArray, 0);
foreach (var s in keyArray)
{
dictionary[s] = 1;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment