Get Value from Dictionary Object in C#

Create Dictionary,
  1. Dictionary<int, List<string>> dictionary = new Dictionary<int, List<string>>{  
  2.       {1,new List<string>{"Dee""X""23"}},  
  3.       {2,new List<string>{"Joe""X""24"}}  
  4. };  
Get the Value from Dictionary, 
  1. void GetKeyAndValueFromDict()  
  2.  {  
  3.         //To fetch keys and values from dictionary  
  4.         foreach (KeyValuePair<int, List<string>> item in dictionary)  
  5.        {  
  6.             var key = item.Key;  
  7.             var value = item.Value;  
  8.             Console.WriteLine("Details are: {Name=" + value[0] + ", Class=" + value[1] + ", Roll Number=" + value[2]);  
  9.        }  
  10.  }