public void AppendArg(string text)
{
if(this.Length == 0)
{
_args = new string[] { text };
}
else
{
List<string> args = new List<string>(_args);
args.Add(text);
_args = args.ToArray();
}
}
private void ParseCommandLine(string[] args) { List<idCmdArgs> argList = new List<idCmdArgs>(); idCmdArgs current = null; foreach(string arg in args) { if(arg.StartsWith("+") == true) { current = new idCmdArgs(); current.AppendArg(arg.Substring(1)); argList.Add(current); } else { if(current == null) { current = new idCmdArgs(); argList.Add(current); } current.AppendArg(arg); } } _commandLineArguments = argList.ToArray(); }