Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

Strings.UCase Method (String)

Returns a string or character containing the specified string converted to uppercase.

Namespace:  Microsoft.VisualBasic
Assembly:  Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)
'Declaration
Public Shared Function UCase ( _
	Value As String _
) As String

Parameters

Value
Type: System.String

Required. Any valid String or Char expression.

Return Value

Type: System.String
Returns a string or character containing the specified string converted to uppercase.

Only lowercase letters are converted to uppercase; all uppercase letters and nonletter characters remain unchanged.

This function uses the application's culture information when manipulating the string so that the case changes are appropriate for the locale in which the application is being used.

Security noteSecurity Note

If your application makes security decisions based on the result of a comparison or case-change operation, then the operation should use the String.Compare method, and pass Ordinal or OrdinalIgnoreCase for the comparisonType argument. For more information, see How Culture Affects Strings in Visual Basic.

This example uses the UCase function to return an uppercase version of a string.

' String to convert. 
Dim LowerCase As String = "Hello World 1234" 
' Returns "HELLO WORLD 1234". 
Dim UpperCase As String = UCase(LowerCase)

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.