我正在尝试从我的资源中复制一个文件(所以当我发布它时,程序可以访问该文件而无需用户篡改它)。但当我使用这段代码复制时,vb告诉我Value of type '1-dimensional array of Byte' cannot be converted to 'String'
Dim directory = "C:\Users\Bryce\Desktop\file.dat"
System.IO.File.Copy(My.Resources.file, directory, True)
如果我尝试System.IO.File.Copy(My.Resources.file.toString, directory, True)
它说
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
Additional information: Could not find file 'System.Byte[]'.
有什么想法吗?