将 SQL 服务器 class vb 转换为 C#
Converting SQL Server class vb to c#
如何转换此代码行
Public Sub New()
/*'StoredProcedure USE*/
MyBase.New(ConnectionStrings("MSSQL_DBConnectionString").ToString, "")
Me.SelectCommandType = SqlDataSourceCommandType.StoredProcedure
Me.InsertCommandType = SqlDataSourceCommandType.StoredProcedure
Me.DeleteCommandType = SqlDataSourceCommandType.StoredProcedure
Me.UpdateCommandType = SqlDataSourceCommandType.StoredProcedure
End Sub
我也在尝试 http://converter.telerik.com/ 但没有得到结果。
public New() :base(ConnectionStrings("MSSQL_DBConnectionString").ToString, ""){
this.SelectCommandType = SqlDataSourceCommandType.StoredProcedure;
this.InsertCommandType = SqlDataSourceCommandType.StoredProcedure;
this.DeleteCommandType = SqlDataSourceCommandType.StoredProcedure;
this.UpdateCommandType = SqlDataSourceCommandType.StoredProcedure;}
感谢您的帮助
您必须在任何转换器中输入有效的 VB 代码才能获得有意义的结果(您的评论不是 VB 评论)。
C# 等效构造函数如下,但 class 名称未知 - 将 "class name" 替换为封闭 class:
的名称
public <class name>() : base(ConnectionStrings["MSSQL_DBConnectionString"].ToString(), "")
{
///*'StoredProcedure USE*/
this.SelectCommandType = SqlDataSourceCommandType.StoredProcedure;
this.InsertCommandType = SqlDataSourceCommandType.StoredProcedure;
this.DeleteCommandType = SqlDataSourceCommandType.StoredProcedure;
this.UpdateCommandType = SqlDataSourceCommandType.StoredProcedure;
}
如何转换此代码行
Public Sub New()
/*'StoredProcedure USE*/
MyBase.New(ConnectionStrings("MSSQL_DBConnectionString").ToString, "")
Me.SelectCommandType = SqlDataSourceCommandType.StoredProcedure
Me.InsertCommandType = SqlDataSourceCommandType.StoredProcedure
Me.DeleteCommandType = SqlDataSourceCommandType.StoredProcedure
Me.UpdateCommandType = SqlDataSourceCommandType.StoredProcedure
End Sub
我也在尝试 http://converter.telerik.com/ 但没有得到结果。
public New() :base(ConnectionStrings("MSSQL_DBConnectionString").ToString, ""){
this.SelectCommandType = SqlDataSourceCommandType.StoredProcedure;
this.InsertCommandType = SqlDataSourceCommandType.StoredProcedure;
this.DeleteCommandType = SqlDataSourceCommandType.StoredProcedure;
this.UpdateCommandType = SqlDataSourceCommandType.StoredProcedure;}
感谢您的帮助
您必须在任何转换器中输入有效的 VB 代码才能获得有意义的结果(您的评论不是 VB 评论)。 C# 等效构造函数如下,但 class 名称未知 - 将 "class name" 替换为封闭 class:
的名称public <class name>() : base(ConnectionStrings["MSSQL_DBConnectionString"].ToString(), "")
{
///*'StoredProcedure USE*/
this.SelectCommandType = SqlDataSourceCommandType.StoredProcedure;
this.InsertCommandType = SqlDataSourceCommandType.StoredProcedure;
this.DeleteCommandType = SqlDataSourceCommandType.StoredProcedure;
this.UpdateCommandType = SqlDataSourceCommandType.StoredProcedure;
}