Partilhar via


Método TextSelection.ChangeCase

Altera o caso do texto selecionado.

Namespace:  EnvDTE
Assembly:  EnvDTE (em EnvDTE.dll)

Sintaxe

'Declaração
Sub ChangeCase ( _
    How As vsCaseOptions _
)
void ChangeCase(
    vsCaseOptions How
)
void ChangeCase(
    [InAttribute] vsCaseOptions How
)
abstract ChangeCase : 
        How:vsCaseOptions -> unit 
function ChangeCase(
    How : vsCaseOptions
)

Parâmetros

Exemplos

Sub ChangeCaseExample()
   ' Open a document before running this example.
   Dim objSel As TextSelection = DTE.ActiveDocument.Selection
   objSel.StartOfDocument(True)
   objSel.StartOfLine(vsStartOfLineOptions.vsStartOfLineOptionsFirstText)
   objSel.CharRight(True, 4)
   objSel.ChangeCase(vsCaseOptions.vsCaseOptionsUppercase)
   MsgBox("Turned text uppercase.")
   objSel.CharLeft(False, 1)
   objSel.ChangeCase(vsCaseOptions.vsCaseOptionsLowercase)
   MsgBox("Turned text lowercase.")
End Sub

Segurança do .NET Framework

Consulte também

Referência

TextSelection Interface

Namespace EnvDTE