diff options
Diffstat (limited to 'src/mscorlib/corefx/System/Globalization/DayLightTime.cs')
-rw-r--r-- | src/mscorlib/corefx/System/Globalization/DayLightTime.cs | 49 |
1 files changed, 23 insertions, 26 deletions
diff --git a/src/mscorlib/corefx/System/Globalization/DayLightTime.cs b/src/mscorlib/corefx/System/Globalization/DayLightTime.cs index 2345fb5bc2..6ec9d6a43e 100644 --- a/src/mscorlib/corefx/System/Globalization/DayLightTime.cs +++ b/src/mscorlib/corefx/System/Globalization/DayLightTime.cs @@ -9,11 +9,11 @@ namespace System.Globalization // This class represents a starting/ending time for a period of daylight saving time. [Serializable] - public partial class DaylightTime + public class DaylightTime { - internal DateTime m_start; - internal DateTime m_end; - internal TimeSpan m_delta; + private readonly DateTime _start; + private readonly DateTime _end; + private readonly TimeSpan _delta; private DaylightTime() { @@ -21,36 +21,33 @@ namespace System.Globalization public DaylightTime(DateTime start, DateTime end, TimeSpan delta) { - m_start = start; - m_end = end; - m_delta = delta; + _start = start; + _end = end; + _delta = delta; } // The start date of a daylight saving period. - public DateTime Start - { - get - { - return m_start; - } - } + public DateTime Start => _start; // The end date of a daylight saving period. - public DateTime End - { - get - { - return m_end; - } - } + public DateTime End => _end; // Delta to stardard offset in ticks. - public TimeSpan Delta + public TimeSpan Delta => _delta; + } + + // Value type version of DaylightTime + internal struct DaylightTimeStruct + { + public DaylightTimeStruct(DateTime start, DateTime end, TimeSpan delta) { - get - { - return m_delta; - } + Start = start; + End = end; + Delta = delta; } + + public readonly DateTime Start; + public readonly DateTime End; + public readonly TimeSpan Delta; } } |