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

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

TextBoxBase.Lines プロパティ

テキスト ボックス コントロールテキスト行を取得または設定します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

<LocalizableAttribute(True)> _
Public Property Lines As
 String()
Dim instance As TextBoxBase
Dim value As String()

value = instance.Lines

instance.Lines = value
[LocalizableAttribute(true)] 
public string[] Lines { get;
 set; }
[LocalizableAttribute(true)] 
public:
property array<String^>^ Lines {
    array<String^>^ get ();
    void set (array<String^>^ value);
}
/** @property */
public String[] get_Lines ()

/** @property */
public void set_Lines (String[] value)

プロパティ
テキスト ボックス コントロールテキスト格納する文字列配列

解説解説
使用例使用例

派生クラス TextBox使用して複数テキスト ボックス コントロールかすべての文字列抽出し、それらの文字列を Debug.WriteLine メソッド使用して表示するコード例次に示します。この例では、textBox1 という名前の TextBox コントロール作成されており、そのコントロールテキスト行が入力されている必要があります

Public Sub ViewMyTextBoxContents()
    Dim counter as Integer
    'Create a string array and store the contents of the Lines property.
    Dim tempArray() as String
    tempArray = textBox1.Lines
    
    'Loop through the array and send the contents of the array to debug
 window.
    For counter = 0 to tempArray.GetUpperBound(0)
        System.Diagnostics.Debug.WriteLine( tempArray(counter) )
    Next
 End Sub
 
public void ViewMyTextBoxContents()
 {
    // Create a string array and store the contents of the Lines property.
    string[] tempArray = new string
 [textBox1.Lines.Length];
    tempArray = textBox1.Lines;
 
    // Loop through the array and send the contents of the array to
 debug window.
    for(int counter=0; counter < tempArray.Length;counter++)
    {
       System.Diagnostics.Debug.WriteLine(tempArray[counter]);
    }
 }
 
public:
   void ViewMyTextBoxContents()
   {
      // Create a string array and store the contents of the Lines property.
      array<String^>^ tempArray = gcnew array<String^>( textBox1->Lines->Length
 );
      tempArray = textBox1->Lines;
      
      // Loop through the array and send the contents of the array to
 debug window.
      for ( int counter = 0; counter < tempArray->Length;
 counter++ )
      {
         System::Diagnostics::Debug::WriteLine( tempArray[ counter ] );
      }
   }
public void ViewMyTextBoxContents()
{
    // Create a string array and store the contents of the Lines property.
    String tempArray[] = new String[textBox1.get_Lines().length];
    tempArray = textBox1.get_Lines();
    // Loop through the array and send the contents of the array to
    // debug window.
    for (int counter = 0; counter <= tempArray.length;
 counter++) {
        System.Diagnostics.Debug.WriteLine(tempArray.get_Item(counter));
    }
} //ViewMyTextBoxContents
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


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

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

辞書ショートカット

すべての辞書の索引

「TextBoxBase.Lines プロパティ」の関連用語

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

   

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



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

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

©2024 GRAS Group, Inc.RSS