| |||||||||
DateTimeFormatInfo.DayNames PropertySystem.Globalization Namespace DateTimeFormatInfo Class Sets or retrieves a one-dimensional array of type String containing the culture-specific full names of the days of the week. [ VB ] public Property DayNames As String ( ) [ C# ] public string [ ] DayNames {get; set;} [ C++ ] public: __property String* get_DayNames ( ); public: __property void set_DayNames ( String* __gc [ ] ); [ JScript ] function get DayNames ( ) : String [ ]; public function set DayNames ( String [ ] ); Property ValueA one-dimensional array of type String containing the culture-specific full names of the days of the week. The array for InvariantInfo contains "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". Exceptions
RemarksIf setting this property, the array must be one-dimensional and must have exactly seven elements. If the custom pattern includes the format pattern "dddd", DateTime.ToString displays the value of DayNames in place of the "dddd" in the format pattern. This property is affected if the value of the Calendar property changes. ExampleThis example shows how you can create a DateTimeFormatInfo object for a given culture, to gain access to the DayNames property for the specified culture. First, you need to instantiate a CultureInfo object with the specified culture name, and then retrieve the CultureInfo.DateTimeFormat property. This returns a DateTimeFormatInfo instance specific to the given culture, which you can then use to get to any DateTimeFormatInfo method or property, such as DayNames. See AlsoDateTimeFormatInfo Members AbbreviatedDayNames MonthNames GetDayName |
| ||||||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme