vb6到c#CONVERSION [英] vb6 to c# CONVERSION

查看:95
本文介绍了vb6到c#CONVERSION的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

EnumChildWindows GetDesktopWindow, _
AddressOf EnumChildCloseup, ByVal 0&



我有这个api功能,我想把它转换为c#;

i不知道0&意思?



以及如何将其转换为c#。



i试过 int 但仍然有错误



帮助我。



谢谢很多。


I have this api function and i want to convert it to c#;
i dont know what 0& means ?

and how to convert it to c# .

i tried int value with zero but still got error

help me .

thanks a lot.

推荐答案

没有多大意义。这些概念太不同了。甚至这些技术的范围也是不同的:.NET是非常独立和可达的,VB6是......忘了它:-)。我宁愿称之为反技术。 :-)



但是,原则上,你可以尝试一些东西。首先,尝试从VB6迁移到VB.NET。例如,参见CodeProject的这篇文章:

将VB6升级到VB .NET [ ^ ]。



一旦你有足够或不足的结果(这是一个非常值得怀疑的问题),你可以进一步正式将VB.NET翻译成C# 。此步骤根本不会产生任何问题,可以完全自动完成。请看我过去的答案:

将C#的COde行解释为VB.NET [ ^ ],

需要将vb代码转换为c# [ ^ ],

FixedPage to ContentPage convert c#代码到vb.net [ ^ ],

来自exe的源代码 [ ^ ]。



我会特别强调基于开源ILSpy的非常全面的高质量离线翻译方法,请参阅上面提到的答案。



但是,我很难建议去做,但它可能值得尝试。第一步(VB6到VB.NET)将是一个很大的问题,而不是其他任何问题。在大多数情况下,基于良好的.NET知识,从头开始创建项目会更好。您的VB6代码将仅用作参考。此外,你有机会避免复制旧的错误。



-SA
It does not make much sense. The concepts are too much different. Even the "volume of the scope" of this technologies are different: .NET is very much self-contained and reach, and VB6 is… forget it :-). I would rather call it "anti-technology". :-)

However, in principle, you could try something. First, try to migrate from VB6 to VB.NET. See for example, this CodeProject article:
Upgrading VB6 to VB.NET[^].

As soon as you have more or less adequate results (which is a very questionable problem), you can further formally translate VB.NET to C#. This step will create no problems at all and can be done fully automatically. Please see my past answers:
COde Line Interpretatio of C# to VB.NET[^],
Need to convert vb code to c#[^],
FixedPage to ContentPage convert c# code into vb.net[^],
Source Code from a exe[^].

I would specially emphasize that very comprehensive high-quality off-line translation method based on the use of open-source ILSpy, please see the answers referenced above.

However, I would hardly advice to go for it, but it might worth trying. The first step (VB6 to VB.NET) would be a great problem, not anything else. In most cases, you would be better off by creating a project from scratch, based on good .NET knowledge. You VB6 code would be then used only as a reference. Also, you would have a chance to avoid reproducing the old bugs.

—SA


Quote:

无论如何,没有捷径;是的,我很确定。

Anyway, there are no shortcuts; yes, I'm sure.





i guess so



i将尝试它/>
一次又一次地感谢



i guess so

i will try it
thanks again and again


这篇关于vb6到c#CONVERSION的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆