//Load the combo box cmbDiversName private void frmMain_Load(object sender, EventArgs e) { //Call the sort function divers.Sort(1); //For loop to fill the combo box for (int i = 0; i < 25; i++) { //Call the print array method from the diversClass to fill the combo box with names cmbDiverName.Items.Add(divers.PrintArray(i, 1)); } }
static void Main(string[] args) { int numDivers = 0; string fileName = ""; fileName = Console.ReadLine(); DiverClass class1 = new DiverClass(fileName); class1.FillArray(fileName); class1.Sort(); class1.PrintArray(); numDivers = class1.CountDivers(); Console.WriteLine("There are " + numDivers + " divers."); Console.WriteLine(class1.CalculateDive(3, 21)); Console.WriteLine(class1.totalScore(20)); }