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#,应如何写?

解决方案 »

  1.   

    public SqlClient.SqlCommand SelectCommand
    {
    get
    {
    if(Me._commandCollection == null)
    {
    Me.InitCommandCollection();
    }
    return Me._commandCollection; }
    set
    {
    Me._commandCollection = value;
    }
    }
      

  2.   


    public SqlClient.SqlCommand SelectCommand
    {
    get
    {
    if(Me._commandCollection == null)
    {
    Me.InitCommandCollection();
    }
    return Me._commandCollection; }
    set
    {
    Me._commandCollection = value;
    }
    }
      

  3.   

    网上有很多转换软件了,VB,C#还是好转的
      

  4.   


    public SqlClient.SqlCommand SelectCommand
    {
        get
        {
            if(This._commandCollection == null)
            {
                This.InitCommandCollection();
            }
            return This._commandCollection;    }
        set
        {
            This._commandCollection = value;
        }
    }更正一下,C#中没有Me,vb中的Me和C#中的this是对应的