static async Task Test() { var foo = new Foo(); var bar2 = new Bar2(); object resultObject = await CallGetByReflection(foo, bar2); IBar result = (IBar)resultObject; result.WriteOut(); //or if (resultObject is Bar) { ((Bar)resultObject).Something(); } else if (resultObject is Bar2) { ((Bar2)resultObject).SomethingElse(); } }