.Net Framework 4.0 C# Console parameters args Bug


Build a simple C# Console App:

static void Main(string[] args)
        {
            if (args != null)
            {
                foreach (string param in args)
                {
                    Console.WriteLine(param);
                }
            }

            Console.ReadLine();
        }

Try running with this console parameters:

test.exe –d –p “C:\”

and take a look at the output, you can see C# intend final \” as an escape for “
even if you try

test.exe –d –p “C:\” –e 

you can see C# intend all after first “ as one parameter

Commenti

Post popolari in questo blog

Eclipse underscore not visible

Batch Convert CSV to XLSX with LibreOffice (OpenOffice)