Relative path to absolute path in C#?

前端 未结 8 2103
难免孤独
难免孤独 2020-12-02 14:14

I have xml files that contain href file paths to images (e.g. \"....\\images\\image.jpg\"). The hrefs contain relative paths. Now, I need to extract the hrefs to the images

8条回答
  •  一整个雨季
    2020-12-02 14:27

    It`s best way for convert the Relative path to the absolute path!

    string absolutePath = System.IO.Path.GetFullPath(relativePath);
    

提交回复
热议问题