I have a method in my Form1.cs called GenerateComboBoxList()
and I want to call this in the main method so that the contents of the combo box is generated when the application is started.
public void GenerateComboBoxList()
{
cmbServerDatabase.Items.Add("1");
cmbServerDatabase.Items.Add("2");
cmbServerDatabase.Items.Add("3");
}
However, when I begin to type GenerateComboBoxList()
in the main method, intellisense does not pick this up. Can anyone help with where I am going wrong?