1
Answer

globals

rmtielman

rmtielman

20y
1.5k
1
Here's my problem: I've got a form with a combobox. I want to add the contents to an array each time I click on button1, and the array is in the Global.cs file using System; using System.Collections; using System.IO; namespace WindowsApplication1 { public class Globals { private Globals() { } public static ArrayList getList() { ArrayList arr = new ArrayList(); string cmbval; // value from combo foreach(string cmbval) { arr.AddRange(cmbval); } return arr; } } } and am writing this behind the button1: string cmbval = cboChoose.Text.ToString(); Globals.getList(); Please help.

Answers (1)