Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Changes the case of the text selection.
Namespace: EnvDTE
Assembly: EnvDTE (in EnvDTE.dll)
Syntax
'Declaration
Sub ChangeCase ( _
How As vsCaseOptions _
)
void ChangeCase(
vsCaseOptions How
)
void ChangeCase(
[InAttribute] vsCaseOptions How
)
abstract ChangeCase :
How:vsCaseOptions -> unit
function ChangeCase(
How : vsCaseOptions
)
Parameters
How
Type: EnvDTE.vsCaseOptionsRequired. A vsCaseOptions constant representing the text to insert.
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
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.