有时System.IO.Fileinfo(file).MoveTo()
执行时间太长。有没有办法在1秒后停止执行?
我使用Visual Basic 2013.
Dim f as New System.IO.Fileinfo("C:\test.txt")
Try
' this might take too long
f.MoveTo(System.IO.Path.Combine(f.DirectoryName, f.Name & ".BK"))
catch
Messagebox.show(ex.tostring)
end try