C# method generic params parameter bug?
问题 I appears to me as though there is a bug/inconsistency in the C# compiler. This works fine (first method gets called): public void SomeMethod(string message, object data); public void SomeMethod(string message, params object[] data); // .... SomeMethod("woohoo", item); Yet this causes "The call is ambiguous between the following methods" error: public void SomeMethod<T>(string message, T data); public void SomeMethod<T>(string message, params T[] data); // .... SomeMethod("woohoo", (T)item);