<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.0-preview.1.23110.8" />

DateTimeConfigurationElement

namespace System.Configuration { internal sealed class DateTimeConfigurationElement : ConfigurationElement { private static readonly ConfigurationProperty s_propValue = new ConfigurationProperty("value", typeof(DateTime), DateTime.MinValue, ConfigurationPropertyOptions.IsKey); private static readonly ConfigurationPropertyCollection s_properties = new ConfigurationPropertyCollection { s_propValue }; private readonly DateTime _initValue; private bool _needsInit; protected internal override ConfigurationPropertyCollection Properties => s_properties; [ConfigurationProperty("value", IsKey = true)] public DateTime Value { get { return (DateTime)base[s_propValue]; } set { base[s_propValue] = value; } } public DateTimeConfigurationElement() { } public DateTimeConfigurationElement(DateTime value) { _needsInit = true; _initValue = value; } protected internal override void Init() { base.Init(); if (_needsInit) { _needsInit = false; Value = _initValue; } } } }