V
VC#user
Hi All,
I am relatively new to c#. I am trying to use a code that works fine in the UI mode in console mode.
The application takes a list of files (input in xml) and generates xml files (output) compatible to another tool.
the UI works fine. But I am trying to modify the existing source code to accept arguments while invoking the exe in command line. But in the formmain.cs i have a function that generates the required xml with the following inputs.
public bool bGenerateXml ()
{
bool b_status = false;
{
if (m_bGui)
{
m_ModuleNames = m_SettingsForm.InputFiles;
m_OutputFileName = m_SettingsForm.OutputFilePath;
}
But I am trying to set the m_ModuleNames & m_OutputFileName by taking the input filename and output filename as argument (from program.cs) file but I am facing problems in setting these variables. either related to protection or the type conversion etc.
can someone help on how I can set these variables from program.cs and being able to use the console application.
thanks a lot.
I am relatively new to c#. I am trying to use a code that works fine in the UI mode in console mode.
The application takes a list of files (input in xml) and generates xml files (output) compatible to another tool.
the UI works fine. But I am trying to modify the existing source code to accept arguments while invoking the exe in command line. But in the formmain.cs i have a function that generates the required xml with the following inputs.
public bool bGenerateXml ()
{
bool b_status = false;
{
if (m_bGui)
{
m_ModuleNames = m_SettingsForm.InputFiles;
m_OutputFileName = m_SettingsForm.OutputFilePath;
}
But I am trying to set the m_ModuleNames & m_OutputFileName by taking the input filename and output filename as argument (from program.cs) file but I am facing problems in setting these variables. either related to protection or the type conversion etc.
can someone help on how I can set these variables from program.cs and being able to use the console application.
thanks a lot.