Share via


TextSelection.ChangeCase (Método)

Cambia el caso de la selección de texto.

Espacio de nombres:  EnvDTE
Ensamblado:  EnvDTE (en EnvDTE.dll)

Sintaxis

'Declaración
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

Ejemplos

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

Seguridad de .NET Framework

Vea también

Referencia

TextSelection Interfaz

EnvDTE (Espacio de nombres)