Majid Rahimi Majid Rahimi - 1 year ago 72
C# Question

What is default directory of File.Open?

I have this code:

Stream f = File.Open("data.majid", FileMode.OpenOrCreate, FileAccess.ReadWrite);

Where will be file created?

Answer Source

From the File.Open MSDN documentation:

The path parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see GetCurrentDirectory.