ns
This commit is contained in:
parent
635d5f5f94
commit
02630aa1da
@ -39,12 +39,13 @@ Public Class frmtest
|
||||
End Sub
|
||||
|
||||
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
|
||||
Dim memString As String = "Memory test string !!!"
|
||||
' convert string to stream
|
||||
Dim buffer As Byte() = Encoding.ASCII.GetBytes(memString)
|
||||
Dim ms As New MemoryStream(buffer)
|
||||
|
||||
Dim oStream As New FileStream(txtIDBFOPath.Text, FileMode.Open)
|
||||
Dim oContents(oStream.Length) As Byte
|
||||
|
||||
Dim ms As New MemoryStream(oContents)
|
||||
'write to file
|
||||
Dim file As New FileStream("d:\file.txt", FileMode.Create, FileAccess.Write)
|
||||
Dim file As New FileStream("e:\file.pdf", FileMode.Create, FileAccess.Write)
|
||||
ms.WriteTo(file)
|
||||
file.Close()
|
||||
ms.Close()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user