Tells whether the current CultureInfo is read-only. : CultureInfo I18N « Internationalization I18N « VB.Net

Tells whether the current CultureInfo is read-only.


Imports System
Imports System.Globalization

Public Class SamplesCultureInfo
   Public Shared Sub Main()
      Dim myCI As New CultureInfo("en-US")

      Dim myReadOnlyCI As CultureInfo = CultureInfo.ReadOnly(myCI)

      If myCI.IsReadOnly Then 
         Console.WriteLine("myCI is read only.")
         Console.WriteLine("myCI is writable.")
      End If

      If myCI.DateTimeFormat.IsReadOnly Then 
         Console.WriteLine("myCI.DateTimeFormat is read only.")
         Console.WriteLine("myCI.DateTimeFormat is writable.")
      End If

      If myCI.NumberFormat.IsReadOnly Then 
         Console.WriteLine("myCI.NumberFormat is read only.")
         Console.WriteLine("myCI.NumberFormat is writable.")
      End If

      If myReadOnlyCI.IsReadOnly Then 
         Console.WriteLine("myReadOnlyCI is read only.")
         Console.WriteLine("myReadOnlyCI is writable.")
      End If

      If myReadOnlyCI.DateTimeFormat.IsReadOnly Then 
         Console.WriteLine("myReadOnlyCI.DateTimeFormat is read only.")
         Console.WriteLine("myReadOnlyCI.DateTimeFormat is writable.")
      End If

      If myReadOnlyCI.NumberFormat.IsReadOnly Then 
         Console.WriteLine("myReadOnlyCI.NumberFormat is read only.")
         Console.WriteLine("myReadOnlyCI.NumberFormat is writable.")
      End If

   End Sub 'Main 

End Class 


Related examples in the same category

1.List all Culture InformationList all Culture Information
2.String in Your LanguageString in Your Language
3.CurrentInfo for es-ES
4.Gets the culture types that pertain to the current CultureInfo object.
5.Gets the CultureInfo that represents the culture used by the current thread.
7.whether the current CultureInfo represents a neutral culture.
8.Gets the CultureInfo that represents the parent culture of the current CultureInfo.
9.Defines the types of culture lists that can be retrieved using the CultureInfo.GetCultures method.
10.Console fallback UI culture
11.Determines the specific cultures that use the Chinese language, and displays the parent culture
12.Comparing and Sorting Data for a Specific Culture
13.Gets the list of calendars that can be used by the culture.
14.Display string representations of numbers for en-us culture
15.Specific culture double value format