public string[] GetFoo() {
  System.Collections.ArrayList al = new ArrayList();
  // Connect to the database and create a data reader (myReader)
  while (myReader.Read()) {
    // Do some cools stuff here
    al.Add((string) myReader[“name”]);
  }
  return (string[]) al.ToArray(typeof(string));
}