[英]i can't access a file path vb.net
我真的不明白,代碼清晰簡潔,當我想閱讀現有文件的路徑時,我的應用程序拋出異常。
錯誤:“不支持給定路徑的格式”
https://i.stack.imgur.com/rXNTN.png
即使我改變路徑也是一樣的問題
那是我的代碼:
Dim testFile As System.IO.FileInfo
testFile = My.Computer.FileSystem.GetFileInfo("C:\Users\ochallal\Desktop\ENQ1620_3.sdf")
Dim folderPath As String = testFile.DirectoryName
Dim fileName As String = testFile.Name
Dim fullPath As String
fullPath = My.Computer.FileSystem.CombinePath(folderPath, fileName)
這就是例外的細節
https://i.stack.imgur.com/njJcv.png
我猜測可能是權限問題,但我擁有所有權限,並使用Visual Studio作為Administartor
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.