Index (zero based) must be greater than or equal to zero

后端 未结 8 855
灰色年华
灰色年华 2020-12-01 08:32

Hey I keep getting an error:

Index (zero based) must be greater than or equal to zero and less than the size of the argument list.

相关标签:
8条回答
  • 2020-12-01 09:33

    Change this line:

    The 2 should be 0. Every count starts at 0.

    //Aboutme.Text = String.Format("{2}", reader.GetString(0));//wrong
    
    //Aboutme.Text = String.Format("{0}", reader.GetString(0));//correct
    
    0 讨论(0)
  • 2020-12-01 09:34

    Change this line:

    Aboutme.Text = String.Format("{0}", reader.GetString(0));
    
    0 讨论(0)
提交回复
热议问题