My c# program is a text editor which needs file name as an input parameter. In other words, I would like to start the c# EXE from a BAT file specifying which file to open. For example: "call C:\Temp\MyDotNetApp File1", where 'File1' is the input parameter for the program in C#.
Is this possible in C#? I can't find any tutorial on internet.
My code:
namespace CSVEditor{
public partial class Form1 : Form {
public static string TAG = "";
public static string FileLinnk = "";
}
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
//Input file to read
File = "File1";// <----- This needs to be the input parameeter from BAT file.
//
FileLink = @"c:\temp" + File + ".csv";
ReadCSV(FileLink);
}
Cheers.