Skip to content

Parameter passing in public static void main method ???

kush

Asked Oct 13, 2005, 9:30 PM EDT1 answer
Share
LinkedInX
Hi there.. am writing a middleware application. and having some trouble to pass parameters in the public static void main (String[] args) method.

can anyone help me please ??

static void Main(string[] args)
{
string pathInfo;
pathInfo = "C:\\Kush\\ConsoleApplication1\\bin\\Debug";
BuilderProject.Build bp = new BuilderProject.Build(pathInfo);
}

i need to pass the pathInfo in the static void main function as this console app is being called through the command line.

help plz

kush28

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    pathInfo = args[1];

    args[0] I believe is always the path of the executable.
    0