FixedPage到ContentPage将c#代码转换为vb.net [英] FixedPage to ContentPage convert c# code into vb.net

查看:63
本文介绍了FixedPage到ContentPage将c#代码转换为vb.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无法将c#代码转换为vb.net

C#代码

FixedPage page2 = new FixedPage();

PageContent page2Content = new PageContent();

((IAddChild)page2Content).AddChild(page2);

想在Vb.Net转换



dim fx as new FixedPage

dim cont as new PageContent

无法转换行

((IAddChild)page2Content)。的AddChild(第2页);

进入vb.net

unable to convert c# code to vb.net
C# Code
FixedPage page2= new FixedPage();
PageContent page2Content = new PageContent();
((IAddChild)page2Content).AddChild(page2);
Want to Convert in Vb.Net

dim fx as new FixedPage
dim cont as new PageContent
unable to convert line
((IAddChild)page2Content).AddChild(page2);
Into vb.net

推荐答案

请避免关于从VB.NET到C#的翻译或回复的问题,因为这一切都可以自动完成。



您可以使用Reflector或其开源替换ILSpy或类似工具之一:

http://en.wikipedia.org/wiki/.NET_Reflector [ ^ ],

http:/ /ilspy.net/ [ ^ ]。



此外,这是学习CIL的有效工具之一。它可能非常有用,而且我不太了解这种语言。 CIL知识非常重要,尤其是使用 System.Reflection.Emit ,这是一个非常强大的库。



您可以用一种语言编写代码,编译代码,使用ILSpy加载程序集,选择其他语言,并反编译您需要的代码部分。结果的准确性非常好。



这是一个独立的开源代码转换器: http://codeconvert.codeplex.com/ [ ^ ]。



有许多在线工具:

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

http://converter.telerik.com/ [ ^ ]。



你可以找到更多: http:/ /bit.ly/XFdX2G [ ^ ]。



在一些更复杂的情况下,准确度c值得商榷。



-SA
Please, avoid the questions on the translation from VB.NET to C# or back, because this all can be done automatically.

You can use Reflector or its open-source replacement ILSpy or one of similar tools:
http://en.wikipedia.org/wiki/.NET_Reflector[^],
http://ilspy.net/[^].

Additionally, this is one of effective tools to learn CIL. It can be very useful, and I don''t know a good reference on the language. CIL knowledge is very important, in particular, for using System.Reflection.Emit, an extremely powerful library.

You can write code in one language, compile it, load the assembly with ILSpy, choose another language, and decompile the code part you need. The accuracy of the results is very good.

This is a stand-along open-source code convertor: http://codeconvert.codeplex.com/[^].

There is a number of on-line tools:
http://www.developerfusion.com/tools/convert/vb-to-csharp/[^],
http://converter.telerik.com/[^].

You can find more: http://bit.ly/XFdX2G[^].

In some more complex cases, the accuracy can be questionable.

—SA


这篇关于FixedPage到ContentPage将c#代码转换为vb.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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