Application with Input files..

i want to create application that support input of Files

i dont mean Drug and Drop (not sure anyway)

i want to create the program which u can do

Application.exe Test.text

which returns the info about the Test.text file

which Classes needs to be used

the program is using Registry Key so it can be using by press a file or directory.

For Example of Registry Value Application.exe "%1"

Thank U in Adavnace.. :D




Answer this question

Application with Input files..

  • su45937

    well you need to look at the arguments passed into your app either via the main method or via Environment.GetCommandLineArgs() method, which returns you a string[] array of parameters passed to your application.

    a small example...



    static void Main(string[] args)
    {
    if (args.Length > 0)
    {
    foreach (string curArg in args)
    {
    Console.WriteLine(curArg);

    }
    }
    else
    {
    Console.WriteLine("No args passed");
    }

    }

    now, you need to be specific in explaining what type of info you want to show based on the file



  • Application with Input files..