简体   繁体   English

我可以在.net 3.5中调用.net 2.0 dll吗?

[英]can i call a .net 2.0 dll in .net 3.5?

I am migrating to .net 3.5 and I want to know whether I can call from my 3.5 application, old .net 2.0 dll's methods? 我正在迁移到.net 3.5,我想知道我是否可以从我的3.5应用程序调用旧的.net 2.0 dll的方法?

Some external API's are in .net 2.0 dll. 一些外部API在.net 2.0 dll中。 So I need those. 所以我需要那些。

Kindly let me know. 请告诉我。 Thanks. 谢谢。

Yes. 是。 You can do that. 你可以做到这一点。

.NET 3.5 is nothing more than .NET 2.0 SP2 with some additional assemblies. .NET 3.5只不过是带有一些额外程序集的.NET 2.0 SP2。 This means that .NET 3.5 is .NET 2.0, to a large extent. 这意味着.NET 3.5 很大程度上 .NET 2.0。

Yes, .NET remains compatible with old versions. 是的,.NET仍然与旧版本兼容。 There might be some obsolete code but it will still work. 可能有一些过时的代码,但它仍然可以工作。 Only before 2.0 there can be compatibility issues. 仅在2.0之前可能存在兼容性问题。

Yes. 是。
Genrally, you can run .Net 2.0 applications on a computer with newer versions of .Net, and using a DLL isn't different. 通常,您可以在具有较新版本.Net的计算机上运行.Net 2.0应用程序,并且使用DLL并没有什么不同。

当然,两者都是托管代码soit应该像调用.net 3.5程序集一样工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM