private void fillAlumno() { int i = 0; EventDataProcessor fillTypes = new EventDataProcessor(); List <string> myList = new List <string>(); myList = fillTypes.getFillType(); string[] Types = new string[myList.Count]; foreach (var item in myList) { Types[i] = item; i++; } this.TypeBox.Items.AddRange(Types); }