DayOfWeekExtensions Class
Provides extension methods for the type DayOfWeek.
public static class DayOfWeekExtensions
- Inheritance:
- object object
Methods
IsWeekend(DayOfWeek)
Returns whether the specified DayOfWeek is on a weekend.
public static bool IsWeekend(this DayOfWeek dayOfWeek)
Parameter | Type | Description |
---|---|---|
dayOfWeek | DayOfWeek | The DayOfWeek to examine. |
Returns
ToString(DayOfWeek, DayOfWeekFormatPattern)
Converts the value of a DayOfWeek object to its equivalent string representation using the specified format.
public static string ToString(this DayOfWeek dayOfWeek, DayOfWeekFormatPattern pattern)
Parameter | Type | Description |
---|---|---|
dayOfWeek | DayOfWeek | The DayOfWeek to convert. |
pattern | DayOfWeekFormatPattern | A DayOfWeekFormatPattern specifying the conversion format to use. |
Returns
ToString(DayOfWeek, DayOfWeekFormatPattern, IFormatProvider)
Converts the value of a DayOfWeek object to its equivalent string representation using the specified format and culture-specific format information.
public static string ToString(this DayOfWeek dayOfWeek, DayOfWeekFormatPattern pattern, IFormatProvider provider)
Parameter | Type | Description |
---|---|---|
dayOfWeek | DayOfWeek | The DayOfWeek to convert. |
pattern | DayOfWeekFormatPattern | A DayOfWeekFormatPattern specifying the conversion format to use. |
provider | IFormatProvider | An IFormatProvider that supplies culture-specific formatting information. |