为什么我会收到错误消息Input string was not in a correct format
。在我的这行代码中?
Convert.ToInt32(listView1.Items[4].SubItems[4].ToString())
下面是我使用它的完整代码:
foreach (ListViewItem iiii in listView1.Items)
{
if (Convert.ToInt32(listView1.Items[4].SubItems[4].ToString()) <= Convert.ToInt32(tenthousand.ToString()))
{
message2 = "GREAT";
msgColor2 = System.Drawing.Color.Green;
break; // no need to check any more items - we have a match!
}
labelVideoViews2.Text = message2;
labelVideoViews2.ForeColor = msgColor2;
}