TextInfo Class

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

System.Object
  System.Globalization.TextInfo

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

[SerializableAttribute]
[ComVisibleAttribute(true)]
public class TextInfo : ICloneable, IDeserializationCallback

The TextInfo type exposes the following members.

  NameDescription
Public propertySupported by the XNA FrameworkANSICodePageGets the American National Standards Institute (ANSI) code page used by the writing system represented by the current TextInfo.
Public propertySupported by the XNA FrameworkSupported by Portable Class LibraryCultureNameGets the name of the culture associated with the current TextInfo object.
Public propertyEBCDICCodePageGets the Extended Binary Coded Decimal Interchange Code (EBCDIC) code page used by the writing system represented by the current TextInfo.
Public propertySupported by the XNA FrameworkSupported by Portable Class LibraryIsReadOnlyGets a value indicating whether the current TextInfo object is read-only.
Public propertyIsRightToLeftGets a value indicating whether the current TextInfo object represents a writing system where text flows from right to left.
Public propertyLCIDGets the culture identifier for the culture associated with the current TextInfo object.
Public propertySupported by the XNA FrameworkSupported by Portable Class LibraryListSeparatorGets or sets the string that separates items in a list.
Public propertyMacCodePageGets the Macintosh code page used by the writing system represented by the current TextInfo.
Public propertyOEMCodePageGets the original equipment manufacturer (OEM) code page used by the writing system represented by the current TextInfo.
Top

  NameDescription
Public methodCloneCreates a new object that is a copy of the current TextInfo object.
Public methodSupported by the XNA FrameworkSupported by Portable Class LibraryEqualsDetermines whether the specified object represents the same writing system as the current TextInfo object. (Overrides Object.Equals(Object).)
Protected methodSupported by the XNA FrameworkSupported by Portable Class LibraryFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported by the XNA FrameworkSupported by Portable Class LibraryGetHashCodeServes as a hash function for the current TextInfo, suitable for hashing algorithms and data structures, such as a hash table. (Overrides Object.GetHashCode().)
Public methodSupported by the XNA FrameworkSupported by Portable Class LibraryGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodSupported by the XNA FrameworkSupported by Portable Class LibraryMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodStatic memberReadOnlyReturns a read-only version of the specified TextInfo object.
Public methodSupported by the XNA FrameworkSupported by Portable Class LibraryToLower(Char)Converts the specified character to lowercase.
Public methodSupported by the XNA FrameworkSupported by Portable Class LibraryToLower(String)Converts the specified string to lowercase.
Public methodSupported by the XNA FrameworkSupported by Portable Class LibraryToStringReturns a string that represents the current TextInfo. (Overrides Object.ToString().)
Public methodSupported by the XNA FrameworkToTitleCaseConverts the specified string to titlecase.
Public methodSupported by the XNA FrameworkSupported by Portable Class LibraryToUpper(Char)Converts the specified character to uppercase.
Public methodSupported by the XNA FrameworkSupported by Portable Class LibraryToUpper(String)Converts the specified string to uppercase.
Top

  NameDescription
Explicit interface implemetationPrivate methodIDeserializationCallback.OnDeserializationInfrastructure. Raises the deserialization event when deserialization is complete.
Top

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.

Overrides

The user might use the regional and language options portion of Control Panel to override the values associated with the current culture of Windows. For example, the user might choose to display the date in a different format or to use a currency other than the default for the culture. If the CultureInfo.UseUserOverride property is set to true, the property values of the objects returned by the CultureInfo.DateTimeFormat, CultureInfo.NumberFormat, and CultureInfo.TextInfo properties are also retrieved from the user settings. If the user settings are incompatible with the culture associated with the CultureInfo, for example, if the selected calendar is not one of the OptionalCalendars, the results of the methods and the values of the properties are undefined.

.NET Framework

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

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Portable Class Library

Supported in: Portable Class Library

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft