我在将以下代码行转换为C#
.
//VB Code:
Dim Query As String = "UPDATE Lidhja_Sh_A_M SET Id_A=@Id_A, Id_Sh=@Id_Sh, Id_M=@Id_M WHERE Id_L=@Id_L"
Dim cmd As SqlCommand = New SqlCommand(Query, con)
cmd.Parameters.AddWithValue("@Id_A", Trim(Me.txbIDLA.Text))
cmd.Parameters.AddWithValue("@Id_Sh", Trim(Me.txbIDLSh.Text))
cmd.Parameters.AddWithValue("@Id_M", Trim(Me.txbIDLM.Text))
// C# code with error
cmd.Parameters.AddWithValue("@Id_A", Strings.Trim(this.txbIDLA.Text));
cmd.Parameters.AddWithValue("@Id_Sh", Strings.Trim(this.txbIDLSh.Text));
cmd.Parameters.AddWithValue("@Id_M", Strings.Trim(this.txbIDLM.Text));
代码中的问题在哪里C#
?