Here is my code
private const string abc="demo.sql";
var fileinfo = new fileInfo(abc);
I want to know how fileInfo will read the path, I mean directory path when I do not specify any path for .sql file. I have placed sql file in some other folder in c# project, wanted to know how I can read the path of this folder
It will assume the path is the executing directory of where the application is run from..
The variable fileinfo
would have the following properties and values, if the executing directory of your application was C:\Program Files(x86)\LINQPad5
You'll notice that the Exists
property is False
, because there is no file called demo.sql
in the aforementioned directory.