Public Property SelectCommand() As SqlClient.SqlCommand() Get
If (Me._commandCollection Is Nothing) Then
Me.InitCommandCollection()
End If
Return Me._commandCollection
End Get Set(ByVal value As SqlClient.SqlCommand())
Me._commandCollection = value
End SetEnd Property请问以上代码翻译C#,应如何写?
If (Me._commandCollection Is Nothing) Then
Me.InitCommandCollection()
End If
Return Me._commandCollection
End Get Set(ByVal value As SqlClient.SqlCommand())
Me._commandCollection = value
End SetEnd Property请问以上代码翻译C#,应如何写?
{
get
{
if(Me._commandCollection == null)
{
Me.InitCommandCollection();
}
return Me._commandCollection; }
set
{
Me._commandCollection = value;
}
}
public SqlClient.SqlCommand SelectCommand
{
get
{
if(Me._commandCollection == null)
{
Me.InitCommandCollection();
}
return Me._commandCollection; }
set
{
Me._commandCollection = value;
}
}
public SqlClient.SqlCommand SelectCommand
{
get
{
if(This._commandCollection == null)
{
This.InitCommandCollection();
}
return This._commandCollection; }
set
{
This._commandCollection = value;
}
}更正一下,C#中没有Me,vb中的Me和C#中的this是对应的