The Dictonary<TKey,TValue> does not actually have a .ToArray method. There is an extension method called .ToArray that can bind to Dictionary<TKey,TValue> . But this requires System.Linq to be one of your applications.
Have you confirmed that System.Linq is imported?
Example:
using System.Linq; ... public void Example() { var map = new Dictionary<string,string>(); .. var arr = map.ToArray(); }
source share