有没有办法将vb6转换为C# [英] Is there any way to convert vb6 to C#

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

问题描述





我想将此vb6代码转换为c#。我对c#本身很新,所以我不能自己转换它所以任何人都建议我使用任何可以做到这一点的软件(免费)。





先谢谢。

Hi,

I want to convert this vb6 code into c#. I am very new to c# itself so i am not able to convert it by myself so anyone suggest me with any software (free) that can do this.


Thanks in advance.

推荐答案

使用下面的文章



.NET代码转换 - 转换代码 [ ^ ]
Use below article

.NET Code Conversion - Convert your code[^]


引用



转换的问题是VB6和.NET有完全不同的编程范例。 VB6是一种基于过程和对象的语言而.NET完全面向对象,这意味着您可能想要设计API的方式会有所不同。错误处理功能完全不同,即VB6使用On Error和错误号,而.NET使用异常类和结构化错误处理,因此您想要设计异常管理的方式将完全不同(请注意,这也构成了一部分)的API)。另外,之前你自己编写的东西通常可以由框架类处理,所以你也可以用不同的方式编写代码。


The problem with conversion is that VB6 and .NET have totally different programming paradigms. VB6 was a procedural and object-based language, whereas .NET is fully object oriented, and this means that the way you would probably want to design your API will be rather different. The error handling capabilities are totally different, i.e. VB6 uses On Error with error numbers, whereas .NET uses exception classes and structured error handling, so the way you would want to design the exception management would be totally different (note that this also forms part of the API). In addition, things that you would have written yourself before now can often be handled by framework classes so you would write code in a different way too.





资料来源: http://social.msdn.microsoft .com /论坛/ en-US / csharplanguage / thread / ea9dd08e-78fd-45ef-8858-38d38ed3a676 / [ ^ ]



只需在C#中完成。不要转换!



Source: http://social.msdn.microsoft.com/Forums/en-US/csharplanguage/thread/ea9dd08e-78fd-45ef-8858-38d38ed3a676/[^]

Just do it in C#. Do not convert!


试试这个



http://www.developerfusion.com/tools/convert/csharp-to-vb/ [ ^ ]



谢谢,

Ipsita
Try this

http://www.developerfusion.com/tools/convert/csharp-to-vb/[^]

Thanks,
Ipsita


这篇关于有没有办法将vb6转换为C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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