My absolute path works for me :
const string fileName =
@"C:\Udvikling\MapEditor\MapEditorProject\Data\Track1.xml";
But I want a relative path.
I try’ed :
const string fileName = @"~\Data\Track1.xml";
I get this Error:
“Could not find a part of the path
C:\Udvikling\RollerApp\RollerGame\MapEditorProject\bin\Debug\~\Data\Track1.xml'”
Do not add
~character and use Path.Combine method to combine 2 paths.More or less like this:
Hope this helps.