c# get Image directory path after selecting image on open file dialog

前端 未结 1 1198
借酒劲吻你
借酒劲吻你 2021-01-29 11:44

is there a way to get the image directory path after selecting in file dialog

example C:\\Users\\Admin\\Desktop\\IMG\\pix200.jpg

i have a code that

1条回答
  •  -上瘾入骨i
    2021-01-29 12:46

    Try to make use of the Path.GetDirectoryName method. Example:

    string path = Path.GetDirectoryName(openFD.FileName);
    

    0 讨论(0)
提交回复
热议问题