TextSelection.NewLine メソッド

更新 : 2007 年 11 月

アクティブ ポイントに改行文字を挿入します。

名前空間 :  EnvDTE
アセンブリ :  EnvDTE (EnvDTE.dll 内)

構文

'宣言
Sub NewLine ( _
    Count As Integer _
)
'使用
Dim instance As TextSelection
Dim Count As Integer

instance.NewLine(Count)
void NewLine(
    int Count
)
void NewLine(
    [InAttribute] int Count
)
function NewLine(
    Count : int
)

パラメータ

  • Count
    型 : System.Int32

    省略可能です。挿入する改行文字数。

解説

Count が負の値か 10,000 以上の場合、NewLine は失敗します。

Sub NewLineExample()
   ' Before running this example, open a text document.
   Dim objSel As TextSelection = DTE.ActiveDocument.Selection
   ' Go to first line in document and select it.
   objSel.GotoLine(1, True)
   ' Insert some new lines and some text.
   objSel.NewLine(3)
   objSel.Insert("A new line", vsInsertFlags.vsInsertFlagsInsertAtStart)
End Sub

アクセス許可

  • 直前の呼び出し元に対する完全な信頼。このメンバは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

参照

TextSelection インターフェイス

TextSelection メンバ

EnvDTE 名前空間