Check Drive Exists(string path)

前端 未结 8 1003
半阙折子戏
半阙折子戏 2021-01-03 23:27

How to check the drive is exists in the system from the given string in WPF. I have tried the following

Ex: FileLocation.Text = \"K:\\TestDriv

8条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-04 00:05

    you can try this....

    MessageBox.Show(Environment.SystemDirectory.Contains("D").ToString());
    

提交回复
热议问题