1
Reply

globals

rmtielman

rmtielman

Feb 11 2004 11:48 AM
1.5k
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)