17-10-12, 05:01 PM
كاتب الموضوع : AhmedEssawy
القراءة من ملف binaryكود :
Dim fileContents As Byte()
filecontents = My.Computer.FileSystem.ReadAllBytes("C:\Test.txt")
كود :
Dim fullFilePath As String
Dim fileContents As String
With My.Computer.FileSystem
fullFilePath = .CombinePath(.SpecialDirectories.MyDocuments, "test.txt")
fileContents = .ReadAllText(fullFilePath)
End With
كود :
Dim fileContents As String
fileContents = My.Computer.FileSystem.ReadAllText("C:\Test.txt")
كود :
My.Computer.FileSystem.WriteAllText("C:\Test.txt", "Text", True)
كود :
Dim fileContents() As Byte = {244, 123, 56, 34}
My.Computer.FileSystem.WriteAllBytes("C:\Output.bin", fileContents, True)