⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 systemset.vb

📁 The Management Information System of Library using .NET
💻 VB
字号:
Imports System.IO
Imports System.Runtime.Serialization
Imports System.Runtime.Serialization.Formatters.Binary
Public Class systemSet
    Private myarray As ArrayList
    Public Sub Write()
        Dim formatter As New BinaryFormatter
        Dim stream As New FileStream("MyFile.bin", FileMode.Create, _
                                      FileAccess.Write, FileShare.None)
        formatter.Serialize(stream, myarray)
        stream.Close()
    End Sub

    Public Function ReadArray() As ArrayList
        Dim formatter As New BinaryFormatter
        Dim stream As New FileStream("MyFile.bin", FileMode.Open, _
                                      FileAccess.Read, FileShare.Read)
        myarray = formatter.Deserialize(stream)
        stream.Close()
        Return myarray
    End Function

    Public Sub New(ByVal str As ArrayList)
        Me.myarray = str.Clone
    End Sub
    Public Sub New()

    End Sub
End Class

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -