I have this C# code which is supposed to open a file.
string filePath = @"C:\Data\123.jpg";
FileStream fs = System.IO.File.OpenRead(filePath);
But, it breaks at second line with error message The filename, directory name, or volume label syntax is incorrect
The exception details also shows C:\\dotnet\\solution\\projectname\\C:\\Data\\123.jpg' . Why it goes to the project path?