Converting the Dictionary Keys to String List

We cannot covert the Dictionary keys to List<string> directly.  Because the return type of the Key is KeyCollection. Here is the code to convert the keys to string list.
 
Method 1
  1. Dictionary<stringstring> dictionary = new Dictionary<stringstring>();  
  2. dictionary.Add("One""1");  
  3. dictionary.Add("Two""2");  
  4. List<string> keys=new List<string>(dictionary.Keys);   
Method 2
  1. Dictionary<stringstring> dictionary = new Dictionary<stringstring>();  
  2. dictionary.Add("One""1");  
  3. dictionary.Add("Two""2");  
  4. var key = dictionary.Keys;  
  5. List<string> keys1= key.Cast<string>().ToList();