Condividi tramite


TextSelection.ChangeCase(vsCaseOptions) Method

Definition

Changes the case of the text selection.

public:
 void ChangeCase(EnvDTE::vsCaseOptions How);
public:
 void ChangeCase(EnvDTE::vsCaseOptions How);
void ChangeCase(EnvDTE::vsCaseOptions How);
[System.Runtime.InteropServices.DispId(15)]
public void ChangeCase (EnvDTE.vsCaseOptions How);
[<System.Runtime.InteropServices.DispId(15)>]
abstract member ChangeCase : EnvDTE.vsCaseOptions -> unit
Public Sub ChangeCase (How As vsCaseOptions)

Parameters

How
vsCaseOptions

Required. A vsCaseOptions constant representing the text to insert.

Attributes

Examples

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  

Applies to