using System.Collections.Generic;
public State(string capital, int pop, int size)
public static Dictionary<string, State> GetStates()
var states = new Dictionary<string, State>();
var theState = new State("Montgomery", 123456, 123);
states.Add("Alabama", theState);
theState = new State("Juneau", 3983282, 3833);
states.Add("Alaska", theState);
public static void Main()
var theStates = State.GetStates();
var theState = theStates["Alaska"];
Console.WriteLine("The capital of Alaska is {0}, its population is {1} and it is {2} square miles", theState.Capital, theState.Population, theState.Size);