classfile.vb

来自「Chuong trinh tren PDA cho phep ket noi v」· VB 代码 · 共 45 行

VB
45
字号

Public Class ClassFile
    Private FilePath As String
    Private FileName As String
    Property VFilePath()
        Get
            Return FilePath
        End Get
        Set(ByVal value)
            FilePath = value
        End Set
    End Property
    Property VFileName()
        Get
            Return FilePath
        End Get
        Set(ByVal value)
            FilePath = value
        End Set
    End Property


    Public Function ReadFile()
        Dim Kq As String = ""
        Dim Chuoi As String = ""
        Dim objStreamReader As IO.StreamReader
        Dim strLine As String
        Dim f As String = Me.FilePath + Me.FileName
        objStreamReader = New IO.StreamReader(f)
        strLine = objStreamReader.ReadLine
        Do While Not strLine Is Nothing
            'Write the line to the Console window.
            Chuoi = strLine
            Kq += Chuoi
            Kq += "/"
            strLine = objStreamReader.ReadLine
            'Thong tin moi dong duoc cach boi dau /
        Loop
        'Close the file.
        objStreamReader.Close()
        Return Kq
    End Function

End Class

⌨️ 快捷键说明

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