TextFieldParser.CommentTokens 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
定義留言標記。 註解標記是一串字串,放在行首表示該行是註解,解析器應忽略它。
public:
property cli::array <System::String ^> ^ CommentTokens { cli::array <System::String ^> ^ get(); void set(cli::array <System::String ^> ^ value); };
public string[] CommentTokens { get; set; }
member this.CommentTokens : string[] with get, set
Public Property CommentTokens As String()
屬性值
String[]
一個包含物件所有註解標記 TextFieldParser 的字串陣列。
例外狀況
留言標記包含留白。
範例
此範例指定 TextFieldParser對於 , FileReader 以單一引號(')開頭的行應忽略。
FileReader.TextFieldType =
Microsoft.VisualBasic.FileIO.FieldType.Delimited
FileReader.CommentTokens = New String() {"'"}
備註
這是進階成員;除非你點選 「全部 」標籤,否則它不會在 IntelliSense 中顯示。
零長度的留言標記則被忽略。