Код: Выделить всё
private void Form1_load(object sender, EventArgs e)
{
string[] CollectionAppend = new string[5];
if (File.Exists("SelectContent.txt"))
{
CollectionAppend = File.ReadAllLines("SelectContent.txt");
for (int i = 0; i > CollectionAppend.Length; i++)
{
comboBox1.Items.Add(CollectionAppend[i]);
}
}
else
{
string ErrMessage = "File not found!";
string ErrCaption = "Error!";
MessageBoxButtons buttons = MessageBoxButtons.OK;
MessageBox.Show(ErrMessage, ErrCaption, buttons);
}
}