TextFieldParser.SetFieldWidths メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > TextFieldParser.SetFieldWidths メソッドの意味・解説 

TextFieldParser.SetFieldWidths メソッド

メモ : このメソッドは、.NET Framework version 2.0新しく追加されたものです。

リーダー区切り記号指定された値に設定しフィールド種類FixedWidth設定します

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

Public Sub SetFieldWidths ( _
    ParamArray fieldWidths As Integer()
 _
)
Dim instance As TextFieldParser
Dim fieldWidths As Integer()

instance.SetFieldWidths(fieldWidths)
public void SetFieldWidths (
    params int[] fieldWidths
)
public:
void SetFieldWidths (
    ... array<int>^ fieldWidths
)
public void SetFieldWidths (
    int[] fieldWidths
)
public function SetFieldWidths (
    ... fieldWidths : int[]
)

パラメータ

fieldWidths

Integer配列

解説解説
使用例使用例

この例では、テキスト フィールド パーサー開いてフィールドの幅を 5設定してます。

Using FileReader As New _
Microsoft.VisualBasic.FileIO.TextFieldParser("C:\logs\test.log")
    FileReader.SetFieldWidths(5)
End Using

パス C:\logs\test.log は、実際に解析するファイルの名前とパス置き換えてください

次の例では、テキスト フィールド パーサー開きフィールド幅を 510、および可変長として定義してます。

Using MyReader As New _
Microsoft.VisualBasic.FileIO.TextFieldParser("C:\logs\test.log")
    MyReader.SetFieldWidths(5, 10, -1)
End Using

パス C:\logs\test.log は、実際に解析するファイルの名前とパス置き換えてください

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
TextFieldParser クラス
TextFieldParser メンバ
Microsoft.VisualBasic.FileIO 名前空間
SetFieldWidths
その他の技術情報
TextFieldParser.SetFieldWidths メソッド
TextFieldParser オブジェクト
TextFieldParser オブジェクトによるテキスト ファイル解析
TextFieldParser.SetDelimiters メソッド


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

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

辞書ショートカット

すべての辞書の索引

「TextFieldParser.SetFieldWidths メソッド」の関連用語

TextFieldParser.SetFieldWidths メソッドのお隣キーワード
検索ランキング

   

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



TextFieldParser.SetFieldWidths メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS