Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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)

public string ToLower()

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.


using System;

public class Example
{
   public static void Demo(System.Windows.Controls.TextBlock outputBlock)
   {

      string[] info = { "Name", "Title", "Age", "Location", "Gender" };

      outputBlock.Text += "The initial values in the array are:" + "\n";
      foreach (string s in info)
         outputBlock.Text += s + "\n";

      outputBlock.Text += String.Format("{0}The lowercase of these values is:", "\n") + "\n";

      foreach (string s in info)
         outputBlock.Text += s.ToLower() + "\n";

      outputBlock.Text += String.Format("{0}The uppercase of these values is:", "\n") + "\n";

      foreach (string s in info)
         outputBlock.Text += s.ToUpper() + "\n";
   }
}


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

Show:
© 2014 Microsoft