help
Root Question Message
dynamic
object
as an argument, it is usually possible to make it generic insteaddynamic
in production code, and it was to do:void SomeMethod(MyOneObject x) => ...;
void SomeMethod(MyOtherObject x) => ...;
void SomeMethod(SomeWeirdObject x) => ...;
void GenericMethod<T>
{
T obj = ...;
SomeMethod((dynamic) obj);
}