switch (条件)
{
case "条件A":
ListColor = Color.Blue;
break;
case "条件B":
ListColor = Color.Green;
break;
case "条件C":
ListColor = Color.Red;
break;
}
string[] item = {"ABCD", "EFGH","IJKL" };
listView.Items.Add(new ListViewItem(item));
listView.Items[listView.Items.Count-1].ForeColor = ListColor;
More than 1 year has passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme