gpt4 book ai didi

C# InvalidArgument= '1' 的值对于 'index' 无效

转载 作者:行者123 更新时间:2023-11-30 23:19:07 25 4
gpt4 key购买 nike

<分区>

我收到以下错误:

An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in System.Windows.Forms.dll

Additional information: InvalidArgument=Value of '1' is not valid for 'index'

对于下面的代码。

private void button_confirm_Click(object sender, EventArgs e)
{
listBox_savedata.Items.Add(textBox_ordertostart.Text +" "+ comboBox_suburb.SelectedItem.ToString() + " " + dateTimePicker2.Value.ToShortDateString());


for (int i = 0; i <= listBox_savedata.Items.Count; i++)
{
string s1 = listBox_savedata.Items[i].ToString();
int startpos = s1.IndexOf("PM");
string sub = s1.Substring(0, 5);
if(sub+" "+"PM"==DateTime.Now.ToString("HH:mm tt"))
{
mplayer.PlayLooping();

}
}
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com