我正在使用 vb.net 为 Windows 应用程序编写代码。我想在c:\
. 如果该文件已经存在,我想删除该文件。
my code
-------
Dim file As String = "C:\test.txt"
If System.IO.File.Exists(file) Then
file.Remove(file)
Else
System.Diagnostics.Process.Start(file)
End If
当我尝试打开该文件时出现以下错误。
error
-----
The system cannot find the file specified