Creating the IEnumerable Objects with C#?
any of: values = new Dictionary<string,string> { {“Name”, “John”}, {“City”, “NY”} }; or values = new [] { new KeyValuePair<string,string>(“Name”,”John”), new KeyValuePair<string,string>(“City”,”NY”) }; or: values = (new[] { new {Key = “Name”, Value = “John”}, new {Key = “City”, Value = “NY”} }).ToDictionary(x => x.Key, x => x.Value);