文本读取指定行的类(vb.net)

来源:互联网 发布:吞噬怪物的孩子知乎 编辑:程序博客网 时间:2024/05/16 12:05
Imports System.Data.OleDb
Imports System.IO
Imports Microsoft.VisualBasic

Public Class mStreamReader
    
Inherits StreamReader
    
Public Sub New(ByVal path As String)
        
MyBase.New(path)
    
End Sub


    
Public Function ReadLineAt(ByVal line As IntegerAs String

        
For i As Integer = 1 To line
            
If i = line Then
                
Return MyBase.ReadLine()
            
Else
                
MyBase.ReadLine()
            
End If
        
Next
        
Return String.Empty
    
End Function

End Class
 
原创粉丝点击