CultureInfo.ReadOnly Method (CultureInfo)

 

Returns a read-only wrapper around the specified CultureInfo object.

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

static member ReadOnly : 
        ci:CultureInfo -> CultureInfo

Parameters

ci
Type: System.Globalization.CultureInfo

The CultureInfo object to wrap.

Return Value

Type: System.Globalization.CultureInfo

A read-only CultureInfo wrapper around ci.

Exception Condition
ArgumentNullException

ci is null.

This wrapper prevents any modifications to ci, or the objects returned by the ci.DateTimeFormat and ci.NumberFormat properties.

The following example shows that the ReadOnly method helps protect the DateTimeFormatInfo and NumberFormatInfo instances associated with the CultureInfo.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show: