TextSelection.Insert – metoda
Daný řetězec vloží na pozici kurzoru.
Obor názvů: EnvDTE
Sestavení: EnvDTE (v EnvDTE.dll)
Syntaxe
'Deklarace
Sub Insert ( _
Text As String, _
vsInsertFlagsCollapseToEndValue As Integer _
)
void Insert(
string Text,
int vsInsertFlagsCollapseToEndValue
)
void Insert(
[InAttribute] String^ Text,
[InAttribute] int vsInsertFlagsCollapseToEndValue
)
abstract Insert :
Text:string *
vsInsertFlagsCollapseToEndValue:int -> unit
function Insert(
Text : String,
vsInsertFlagsCollapseToEndValue : int
)
Parametry
- Text
Typ: System.String
Vložit text.
- vsInsertFlagsCollapseToEndValue
Typ: System.Int32
Jeden z vsInsertFlags hodnoty označující, jak vložit text.
Příklady
Visual Basic
Sub InsertExample()
' Before running this example, open a text document.
Dim objSel As TextSelection = DTE.ActiveDocument.Selection
' Go to the 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
Zabezpečení rozhraní .NET Framework
- Plná důvěra přímému volajícímu. Částečně zabezpečený kód nemůže tento člen použít. Další informace naleznete v tématu Používání knihoven z částečně důvěryhodného kódu.