Export (0) Print
Expand All

String.ToLower Method

Returns a copy of this string converted to lowercase, using the casing rules of the current culture.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

'Declaration
Public Function ToLower As String

Return Value

Type: System.String
The lowercase equivalent of the current string.

Starting in Silverlight 4, the behavior of the String.ToLower method has changed. In Silverlight 4, it converts the current string instance to lowercase using the casing rules of the current culture. This conforms to the behavior of the String.ToLower method in the full .NET Framework. In Silverlight 2 and Silverlight 3, it uses the casing rules of the invariant culture.

NoteNote:

This method does not modify the value of the current instance. Instead, it returns a new string in which all characters in the current instance are lowercased.

The following code example converts several mixed case strings to lowercase.



Public Class Example

   Public Shared Sub Demo(ByVal outputBlock As System.Windows.Controls.TextBlock)
      Dim info As String() = {"Name", "Title", "Age", "Location", "Gender"}

      outputBlock.Text &= "The initial values in the array are:" & vbCrLf

      Dim s As String
      For Each s In info
         outputBlock.Text &= s & vbCrLf
      Next s

      outputBlock.Text &= String.Format("{0}The lowercase of these values is:", vbCrLf) & vbCrLf

      For Each s In info
         outputBlock.Text &= s.ToLower() & vbCrLf
      Next s

      outputBlock.Text &= String.Format("{0}The uppercase of these values is:", vbCrLf) & vbCrLf

      For Each s In info
         outputBlock.Text &= s.ToUpper() & vbCrLf
      Next s
   End Sub 'Main
End Class 'ToLowerTest


Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft