请帮我转换代码vb.net到C#,谢谢 [英] Please help me to Convert code vb.net to C#, Thanks

查看:76
本文介绍了请帮我转换代码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

推荐答案

每次需要翻译时都不应该提问。以下是几个更好的可能性:



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屋!

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