Visual Basic NET ( 3)




- 2


. , . :

23

17

86

255

28.08.2005 8:59:27

90

47

35

205

19

255

29.08.2005 1:19:11

46

90

164

18

, .

, , :

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim FS As New FileStream("E:\\.Ind", FileMode.OpenOrCreate)

Dim BW As New BinaryWriter(FS)

Dim B1() As Byte = {23, 17, 86}

Dim B2() As Byte = {90, 47, 35, 205, 19}

Dim B3() As Byte = {46, 90, 164, 18}

Dim As Byte = 255

BW.Write(B1)

BW.Write()

BW.Write(CStr(#8/28/2005 8:59:27 AM#))

BW.Write(B2)

BW.Write()

BW.Write(CStr(#8/29/2005 1:19:11 AM#))

BW.Write(B3)

BW.Close()

FS.Close()

End Sub

: Write , , , . , BinaryReader , String.

. :

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

Dim FS As New FileStream("E:\\.Ind", FileMode.Open)

Dim BR As New BinaryReader(FS)

Dim By As Byte

Dim As DateTime

Dim _ As Boolean = False

Do Until BR.PeekChar() = -1

By = BR.ReadByte

If By = 255 Then

= CDate(BR.ReadString)

If .Date

> #8/28/2005# Then Exit Do

Debug.WriteLine()

ElseIf .Date = #8/28/2005# Then