TextFieldParser.LineNumber プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > TextFieldParser.LineNumber プロパティの意味・解説 

TextFieldParser.LineNumber プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

現在の行番号返しますストリームから取り出す文字なくなった場合は -1 を返します

名前空間: Microsoft.VisualBasic.FileIO
アセンブリ: Microsoft.VisualBasic (microsoft.visualbasic.dll 内)
構文構文

解説解説
使用例使用例

この例では、テキスト ファイルから "Jones" という文字列検索し、その文字列見つかった行を報告します

Using FileReader As New Microsoft.VisualBasic.FileIO.TextFieldParser("C:\ParserText.txt")
    FileReader.TextFieldType = Microsoft.VisualBasic.FileIO.FieldType.Delimited
    FileReader.Delimiters = New String() {"
,"}
    Dim currentRow As String()
    While Not FileReader.EndOfData
        Try
            currentRow = FileReader.ReadFields()
            Dim currentField As String
            For Each currentField In
 currentRow
                If currentField = "Jones"
 Then
                    MsgBox("The name Jones occurs on line "
 & _
                    FileReader.LineNumber)
                End If
            Next
        Catch ex As Microsoft.VisualBasic.FileIO.MalformedLineException
            MsgBox("Line " & ex.Message &
 _
           "is not valid and will be skipped.")
        End Try
    End While
End Using
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
TextFieldParser クラス
TextFieldParser メンバ
Microsoft.VisualBasic.FileIO 名前空間
TextFieldParser.LineNumber プロパティ
その他の技術情報
TextFieldParser.LineNumber プロパティ
TextFieldParser オブジェクト


このページでは「.NET Framework クラス ライブラリ リファレンス」からTextFieldParser.LineNumber プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からTextFieldParser.LineNumber プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からTextFieldParser.LineNumber プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「TextFieldParser.LineNumber プロパティ」の関連用語

TextFieldParser.LineNumber プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



TextFieldParser.LineNumber プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS