请帮我转换代码vb.net到C#,谢谢 [英] Please help me to Convert code vb.net to C#, Thanks
本文介绍了请帮我转换代码vb.net到C#,谢谢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
'转换为C#
如果ctrl.GetType是GetType(DateTimePicker)= False并且ctrl.GetType是GetType(TextBox)= False然后
'这里有一些样品
结束如果
'Convert To C#
If ctrl.GetType Is GetType(DateTimePicker) = False And ctrl.GetType Is GetType(TextBox) = False Then
'Some sample to do here
End If
推荐答案
每次需要翻译时都不应该提问。以下是几个更好的可能性:
- 使用在线翻译之一。我不想指出任何一个特定的;请看这里: http://bit.ly/XFdX2G [ ^ ]。
- 现在,这是一个非常精彩的离线解决方案:使用开源ILSpy:
< a href =http://www.ilspy.net/> http://www.ilspy.net/ [ ^ ],
http:// en .wikipedia.org / wiki / .NET_Reflector [ ^ ]。
首先,您需要编译项目并获得已编译的程序集。它编译为CIL:
http://en.wikipedia.org/wiki/Common_Intermediate_Language [ ^ ]。
您可以将程序集加载到ILSpy中并对其进行反汇编。它有输出语言选项。选择C#或VB.NET,然后重新编译所需的部分代码。你已经完成了。
You should not ask questions every time you need such translations. Here are a couple of much better possibilities:
- Use one of on-line translators. I don't want to point to any particular one; just look here: http://bit.ly/XFdX2G[^].
- Now, a really wonderful off-line solution: use open-source ILSpy:
http://www.ilspy.net/[^],
http://en.wikipedia.org/wiki/.NET_Reflector[^].
First, you need to compile the project and obtain a compiled assembly. It is compiled to CIL:
http://en.wikipedia.org/wiki/Common_Intermediate_Language[^].
You can load assembly into ILSpy and disassemble it. It has the option for output language. Select either C# or VB.NET, and recompile the part of code you need. You are done.
你好,
你也可以看看这个。
将VB.NET转换为C# [ ^ ]
if (object.ReferenceEquals(ctrl.GetType, typeof(DateTimePicker)) == false & object.ReferenceEquals(ctrl.GetType, typeof(TextBox)) == false) {
}
>
这篇关于请帮我转换代码vb.net到C#,谢谢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文