的Windows API和.NET语言语言、Windows、API、NET

2023-09-04 00:12:11 作者:诗酒趁年少

人们总是告诉我,如果我这样做,应该使用某些Windows的API做任何工艺水平工作的一些应用程序,我必须用VC ++而不是任何其他.NET语言。

People always advised me that if I am doing some application that should use some Windows APIs to do any process level job, I must use VC++ and not any other .net language.

是否有任何道理?

可以一切都可以用VC做++在其他.NET语言也可以做?

Can everything that can be done using VC++ be done in other .net languages also?

是否所有的.NET语言时,他们的能力都比较相同的?

Are all the .net languages the same when their capabilities are compared?

推荐答案

如果您需要与本地code工作得相当密切,C ++很可能使生活更轻松。然而,没有什么内在的错误使用P / Invoke调用到从C#,VB.NET,F#等。

If you need to work with native code fairly intimately, C++ is likely to make life easier. However, there's nothing inherently wrong with using P/Invoke to call into the Win32 API from C#, VB.NET, F# etc.

不是所有的.NET语言都在功能方面是相同的,尽管C#和VB.NET是的主要的在功能上等同。我知道有一些东西C ++ / CLI暴露并非由C#或VB.NET暴露 - 我不知道的情况正好相反。 (我不知道C ++ / CLI是像拉姆达EX pressions,扩展方法等。)

Not all .NET languages are the same in terms of capabilities, although C# and VB.NET are largely equivalent in functionality. I know there are some things which C++/CLI exposes which aren't exposed by C# or VB.NET - I don't know if the reverse is true. (I've no idea what C++/CLI is like for lambda expressions, extension methods etc.)