Here is the code I was running. When I try to run this I get an error "Index was outside the bounds of the array." on the line "args[0] = Console.ReadLine();"
CODE
static void Main(string[] args)
{
while (args.Length < 1 || args[0] == null)
{
Console.WriteLine(@"No file passed. Pass model file path and name. (EX: VCChecklist 'C:\Model.igv'). Please enter a correct path or type 'Exit' to cancel.");
args[0] = Console.ReadLine();
if (File.Exists(args[0]))
{
CompileChecklist(args[0]);
return;
}
else
{
Console.WriteLine("File '" + args[0] + "' could not be found.");
args[0] = null;
}
}
return;
}
I was able to get around this issue by setting
CODE
args = new string[1];
and then using
CODE
args[0] = Console.ReadLine();
This post has been edited by SpiderSpartan: 5 Aug, 2008 - 11:29 AM