Im trying to save files. They save OK the first time, i.e. when theyre created, but I cant successfully save the changes. Heres the code Im using:
In relation to FileAccess.Write the helpfile says:
"Specifies that the operating system should create a new file. If the file already exists, it will be overwritten. This requires FileIOPermissionAccess.Write. System.IO.FileMode.Create is equivalent to requesting that if the file does not exist, use CreateNew; otherwise, use Truncate. ", but the link for FileIOPermissionAccess.Write is broken.
How do I get my files to save properly?
Code:
Dim TestFileStream As Stream
TestFileStream = File.Open(FullPath, FileMode.Create, FileAccess.Write)
Dim serializer As New BinaryFormatter
serializer.Serialize(TestFileStream, Me.SerializationCol)
TestFileStream.Close()
In relation to FileAccess.Write the helpfile says:
"Specifies that the operating system should create a new file. If the file already exists, it will be overwritten. This requires FileIOPermissionAccess.Write. System.IO.FileMode.Create is equivalent to requesting that if the file does not exist, use CreateNew; otherwise, use Truncate. ", but the link for FileIOPermissionAccess.Write is broken.
How do I get my files to save properly?