title: how do I get my method in eventdb.cs to populate my combobox in my main form?
body: <p>I have a class called EventDB.cs that grabs data from a text file. I have every 5 lines input as a object list called events but am having trouble trying to populate the list into my combobox on my main form. Could someone point out what I'm doing wrong? Here is my code for my Event.cs, EventDB.cs and main ticketinfo.cs. Thanks in advance!</p>
  
  <p>Event.cs</p>
  
  <pre><code>namespace TicketInformation
  {
    public class Event
  {
    public Event()
    {
    }
  
    public Event(int day, string time, double price, string strEvent, string description)
    {
       this.Day = day;
       this.Time = time;
       this.Price = price;
       this.StrEvent = strEvent;
       this.Description = description;
    }
  
    public int Day { get; set; }
  
    public string Time { get; set; }
  
    public double Price { get; set; }
  
    public string StrEvent { get; set; }
  
    public string Description { get; set; }
  
    public string GetDisplayText()
    {
       return StrEvent;
    }
  
    }
  }
  </code></pre>
  
  <p>EventDB.cs</p>
  
  <pre><code>namespace TicketInformation
  {
  public static class EventDB
  {
    private static string dir = Directory.GetCurrentDirectory();
    private static string path = dir + "\\calendar.txt";
  
  
    public static List&lt;Event&gt; ExtractData() //(DateTime dtmDay)
    {
       //int intChosenDay = dtmDay.Day;
  
       // create object for input stream for text file
       StreamReader textIn =
      new StreamReader(
      new FileStream(path, FileMode.OpenOrCreate, FileAccess.Read));
  
       //create the list
       List&lt;Event&gt; events = new List&lt;Event&gt;();
  
  
  
       string[] lines = File.ReadAllLines(path);
  
       for (int index = 4; index &lt; lines.Length; index += 5)
       {
          Event special = new Event();
          special.Day = Convert.ToInt32(lines[index - 4]);
          special.Time = (lines[index - 3]);
          special.Price = Convert.ToDouble(lines[index - 2]);
          special.StrEvent = lines[index - 1];
          special.Description = lines[index];
          events.Add(special);
       }
  
  
       //close stream for the text file
       textIn.Close();
  
       return events;
  
    }
  
    }
    }
  </code></pre>
  
  <p>Ticketinfo.cs</p>
  
  <pre><code>static void Main()
    {
       Application.Run(new FrmEvents());
    }
  
    private List&lt;Event&gt; events = null;
  
  
    private void FrmEvents_Load(
       object sender, System.EventArgs e)
    {
       CreateEventList();
  
    } 
  
    private void CreateEventList()
    {
  
       EventDB.ExtractData(events); //(mvwDate.SelectionStart);
  
       cboEvent.Items.Clear();
  
       foreach (Event e in events)
       {
          cboEvent.Items.Add(e.GetDisplayText());
       }
  
  
    } //end method CreateEventList
  </code></pre>