2013-06-19 76 views
0

不知道我在做什麼錯。我想創建一個文件夾來將圖像存儲在我的應用程序中。在Apps exe中創建文件夾。是

這是我正在嘗試使用的代碼。

If (Not System.IO.Directory.Exists(Application.StartupPath \ "quilt_images")) Then 
     System.IO.Directory.CreateDirectory(Application.StartupPath \ "quilt_images") 
    End If 

我正在錯誤

System.InvalidCastException是未處理的從字符串的HResult = -2147467262 消息=轉化率 「C:\用戶\ DAD \文檔\ Visual ST」 鍵入 '長' 是無效。

回答

1

在這一行:

If (Not System.IO.Directory.Exists(Application.StartupPath \ "quilt_images")) Then

你劃分,而不是串聯的字符串。

+0

好的我看到感謝應該是'&'不''' –

相關問題