阅读背景:

支持旧框架版本中使用的库中较新的.NET框架功能

来源:互联网 

I have an asynchronous library which is compiled under .NET 3.5, since it's used by .NET 3.5 applications, but I want to be able to deal with .NET 4.0 CancellationTokens if someone wants to pass one in. In order to include .NET 4.0 stuff, I have to break compatibility with .NET 3.5. The only option I've come up with so far would be to just allow passing in "object" and then use reflection, but that makes for an ugly public interface... I want to make sure the client code is passing in the correct object type at compile time, not runtime.I have an asynchronous library which is compile




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: