G
Guest
The following code is fairly simple to capture command line arguments:
using System;
namespace ConsoleApplication1
{
class Class1
{
static void Main(string[] args)
{
string first = args[0];
string second = args[1];
}
}
}
If the arguments are test1 and test2, it works great. If the arguments are
C:\test1 and test2, the first variable contains an "@" at the beginning of
the string. Had no trouble in visual studio 2002, but this is driving me
nuts in 2003.
using System;
namespace ConsoleApplication1
{
class Class1
{
static void Main(string[] args)
{
string first = args[0];
string second = args[1];
}
}
}
If the arguments are test1 and test2, it works great. If the arguments are
C:\test1 and test2, the first variable contains an "@" at the beginning of
the string. Had no trouble in visual studio 2002, but this is driving me
nuts in 2003.