I want to open a text file programmatically using C#. I have used :
System.Diagnostics.Process.Start(test.txt);
but this code is causing OS command injection problem when scanning for threats.
Is there any way that i can open a text file programmatically?? or way to bypass that OS command injection?
Thank you
omer schleifer :
You should call a program, say notepad:\n\nProcess.Start(\"notepad.exe\", fileName);\n\n\nthe argument is the file name:\n\n Process.Start(\"notepad.exe\", \"Test.txt\");\n\n\nSee the problem with your code in the comments of this post:\nOpen a file with Notepad in C#",
2014-01-14T08:43:54