Udostępnij za pośrednictwem


TextInfo Class

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Defines properties and behaviors, such as casing, that are specific to a writing system.

Inheritance Hierarchy

System.Object
  System.Globalization.TextInfo

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

Syntax

'Declaration
<ComVisibleAttribute(True)> _
Public Class TextInfo
[ComVisibleAttribute(true)]
public class TextInfo

The TextInfo type exposes the following members.

Properties

  Name Description
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360 CultureName Gets the name of the culture associated with the current TextInfo object.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360 IsReadOnly Gets a value indicating whether the current TextInfo object is read-only.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360 ListSeparator Gets or sets the string that separates items in a list.

Top

Methods

  Name Description
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 Equals Determines whether the specified object represents the same writing system as the current TextInfo object. (Overrides Object.Equals(Object).)
Protected methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 Finalize Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 GetHashCode Serves as a hash function for the current TextInfo object, suitable for hashing algorithms and data structures, such as a hash table. (Overrides Object.GetHashCode().)
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 GetType Gets the Type of the current instance. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 ToLower(Char) Converts the specified character to lowercase.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 ToLower(String) Converts the specified string to lowercase.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 ToString Returns a string that represents the current TextInfo. (Overrides Object.ToString().)
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 ToUpper(Char) Converts the specified character to uppercase.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 ToUpper(String) Converts the specified string to uppercase.

Top

Remarks

A writing system is the collection of scripts and orthographic rules required to represent a language as text. The TextInfo class represents a writing system.

The application should use the CultureInfo.TextInfo property to obtain the TextInfo object for a particular CultureInfo object. If a security decision depends on a string comparison or a case-change operation, the application should use the CultureInfo.TextInfo property of the object returned by the CultureInfo.InvariantCulture property to ensure that the behavior of the operation is consistent regardless of the operating system culture settings.

Version Information

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

Platforms

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

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.