从vb.net转换c#

编程入门 行业动态 更新时间:2024-10-27 21:25:20
本文介绍了从vb转换c#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

Hello All, 有谁能告诉我如何将这个Dim thisString转换为String =从vb转换为c#please?

Hello All, Can anybody tell me how I can convert this Dim thisString As String = """" from vb to c# please?

推荐答案

看看这里: Have a look here: string thisString = @"""""";

Dim thisString As String = """"

详情请见: 字符串数据Ty pe(Visual Basic) [ ^ ] 字符串(C#编程指南) [ ^ ] 谢谢你,戴夫的评论。 包括双引号在@ -quoted字符串中标记,加倍 来源:字符串(C#参考) [ ^ ] [/ EDIT]

For further information, please, see: String Data Type (Visual Basic)[^] Strings (C# Programming Guide)[^] Thank you, Dave for your comment. To include a double quotation mark in an @-quoted string, double it Source: string (C# Reference)[^] [/EDIT]

从中选择任何转换器 .NET代码转换 - 转换代码 [ ^ ] Pick any converter from this .NET Code Conversion - Convert your code[^]

您已经获得了一些关于自动翻译的建议,但不幸的是,最缺乏最全面的离线方法。 一个非常棒的离线解决方案是开源的ILSpy: www.ilspy/ [ ^ ], http://en.wikipedia / wiki / .NET_Reflector [ ^ ] 。 首先,您需要编译项目并获得已编译的程序集。它编译为CIL: en.wikipedia/wiki/Common_Intermediate_Language [ ^ ]。 您可以将程序集加载到ILSpy中并对其进行反汇编。它有输出语言选项。选择C#或VB.NET,然后重新编译所需的部分代码。你已经完成。 你也可以使用上面引用的Reflector,但它不是完全免费的而不是开源的,它被ILSpy取代。 对于在线翻译:根据我的观察,这个比其他人更准确: converter.telerik/ [ ^ ]。 祝你好运,
-SA
You already got some advice on automatic translation, but unfortunately, the most comprehensive off-line method is missing. A really wonderful off-line solution is the open-source ILSpy: www.ilspy/[^], en.wikipedia/wiki/.NET_Reflector[^]. First, you need to compile the project and obtain a compiled assembly. It is compiled to CIL: en.wikipedia/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. You can also use Reflector referenced above, but it is not completely free and not open-source, it is being superseded by ILSpy. As to on-line translators: in my observations, this one is more accurate than some others: converter.telerik/[^]. Good luck,
—SA

更多推荐

从vb.net转换c#

本文发布于:2023-05-27 23:12:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/306141.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:vb   net

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!