将vb.net代码转换为C# [英] convert vb.net code to c#

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

问题描述

你好.
只是我需要有人使用这种类型的代码,以帮助我将用vb.net编写的代码转换为c#:

hello.
just i need that if someone has work with this type of code,to help me to convert this code written in vb.net to c#:

Dim SQL =
     <sql>
      insert into employee values('ok')
      </sql>



并且vb到c#转换器不适用于此代码,因此我需要有人在c#中使用相同的代码.
非常感谢.



and vb to c# converter doesn''t work for this code,so i need someone who has work with the same code in c#.
thank you very much.

推荐答案

对此没有任何翻译,因为C#无法做到.您必须使用SqlConnectionSqlCommand对象(或使用LINQ-t--SQL)漫长"地完成它.
There is no translation for this because C# can''t do it. You have to do it the "long" way, with a SqlConnection and SqlCommand objects (or with LINQ-t--SQL.


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

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