开发者

How to cast object to ISingleResult<T> where T is interface C# 3.0

开发者 https://www.devze.com 2023-01-07 20:34 出处:网络
In my program I have a function which returns object. I know that this object is ISingleResult<T> where T is unknown, but it implements an interface IFoo. How do I cast this object to开发者_如何

In my program I have a function which returns object. I know that this object is ISingleResult<T> where T is unknown, but it implements an interface IFoo. How do I cast this object to开发者_如何学C ISingleResult<IFoo> using C# 3.0?

Thank you for your help!


Use the ReturnValue property. It is defined in one of the interfaces ISingleResult<T> derives from.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号