Why the deduced return type of a method with a ExpandoObject parameter is always dynamic?
问题 As code snippet below, why the deduced type of list is dynamic in VS2017? Thus, this code will produce compile error. And I notice that if I change the dynamic keyword to var , then everything is OK. How to fix it if I want to keep using dynamic keyword? class Program { static void Main(string[] args) { dynamic d = new ExpandoObject(); var list = GetList(d); // ===> vs deduced list as dynamic var r = list.Select(x => x.Replace("a", "_")); var slist = new List<string>(); var sr = slist.Select