Using the classes in the
System.IO
namespace, you can work with the file system to load the commands. You'll have to decide on a format first, but the simplest way to do it is to create a text file with a command on each line.
So, a
commands.txt
file could look like this:
Good morning.
Hello Mike.
Good morning Eddy.
Good afternoon.
And then you could read it from your program:
using System.IO;
string[] commands = File.ReadAllLines("commands.txt");
Choices choices = new Choices(commands);
Documentation about File.ReadAllLines:
File.ReadAllLines Method (String) (System.IO)[
^]