[This is preliminary documentation and is subject to change.]
A mutable builder class for Period values. Each property can
be set independently, and then a Period can be created from the result
using the Build()()()() method.
| C# | Visual Basic | Visual C++ |
public sealed class PeriodBuilder : IXmlSerializable
Public NotInheritable Class PeriodBuilder _ Implements IXmlSerializable
public ref class PeriodBuilder sealed : IXmlSerializable
| All Members | Constructors | Methods | Properties | ||
| Icon | Member | Description |
|---|---|---|
| PeriodBuilder()()()() |
Creates a new period builder with an initially zero period.
| |
| PeriodBuilder(Period) |
Creates a new period builder with the values from an existing
period. Calling this constructor instead of ToBuilder()()()()
allows object initializers to be used.
| |
| Build()()()() |
Builds a period from the properties in this builder.
| |
| Days |
Gets or sets the number of days within the period.
| |
| Hours |
Gets or sets the number of hours within the period.
| |
| Item[([( PeriodUnits])]) |
Gets or sets the value of a single unit.
| |
| Milliseconds |
Gets or sets the number of milliseconds within the period.
| |
| Minutes |
Gets or sets the number of minutes within the period.
| |
| Months |
Gets or sets the number of months within the period.
| |
| Seconds |
Gets or sets the number of seconds within the period.
| |
| Ticks |
Gets or sets the number of ticks within the period.
| |
| Weeks |
Gets or sets the number of weeks within the period.
| |
| Years |
Gets or sets the number of years within the period.
|
This type is not thread-safe without extra synchronization, but has no
thread affinity.
| Object | |
| PeriodBuilder | |
Assembly: NodaTime (Module: NodaTime.dll) Version: 1.2.0.0 (1.2.0)