When you create the ExecAction, you need to specify $(Arg0) for the Arguments value.
td.Actions.Add(new ExecAction("myprogram.exe", "$(Arg0)"));
Then, you can call the Run method using the string value you wish to pass as a parameter.
task.Run("My parameter string to pass to myprogram.exe");