HARD CODED PATHS IN C#

Posted by maya on Stack Overflow See other posts from Stack Overflow or by maya
Published on 2010-04-09T05:29:34Z Indexed on 2010/04/09 5:33 UTC
Read the original article Hit count: 301

Filed under:

Hai I am developing an application in C#.I have a folde called myfolder it contains a file called mypoints.bmp.the folder myfolder is in my project folder it is in D drive .the path is D:\Myproject\myfolder\mypoints.bmp Now in my program whereever i need mypoints.bmp i hardcoded the wholw path.when my project is copied in to a different system under C drive i am not able to run mu project because of the hardcoded path.HOw can i give the path so that there will not be any problem evenif it is loaded in to a different system under a different drive.Please help. THAnks maya

© Stack Overflow or respective owner

Related posts about classpath