DayOfWeekExtensions Class
Provides extension methods for the DayOfWeek type.
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, IFormatProvider?)
Converts the value of a DayOfWeek object to its equivalent string representation using the specified format pattern and optional culture-specific format information.
public static string ToString(this DayOfWeek dayOfWeek, DayOfWeekFormatPattern pattern, IFormatProvider? provider = null)
Parameter | Type | Description |
---|---|---|
dayOfWeek | DayOfWeek | The DayOfWeek to convert. |
pattern | DayOfWeekFormatPattern | A DayOfWeekFormatPattern specifying the conversion format pattern to use. |
provider | IFormatProvider | An optional IFormatProvider that supplies culture-specific formatting information.
If |