I am using Visual Studio 2005 (.NET version> 2.0+) to create a Windows application.
According to my observation, the relative path to the file can be specified in relation to the EXE file created in the DEBUG folder. For example: if I specify the path as "images \ image.png", the file inside the "images" folder will be loaded (which is located in the DEBUG folder).
My question is: what if the file exists in the parent folders? Suppose .. "DEBUG" is located in the "BIN" folder and has another "IMAGES" folder, which I must specify in my code.
(bin/images/image.png)
this problem can be avoided by copying the "IMAGES" folder inside the debug folder itself or by specifying an absolute path, but .. I want to know if there is a way to specify the parent folders in the relative path
source
share