DateTimeSerializationSection Class

Handles configuration settings for XML serialization of System.DateTime instances.

Syntax

class DateTimeSerializationSection : ConfigurationSection  

Methods

The following table lists the methods exposed by the DateTimeSerializationSection class.

Name Description
GetAllowDefinition (Inherited from ConfigurationSection.)
GetAllowLocation (Inherited from ConfigurationSection.)
RevertToParent (Inherited from ConfigurationSection.)
SetAllowDefinition (Inherited from ConfigurationSection.)
SetAllowLocation (Inherited from ConfigurationSection.)

Properties

The following table lists the properties exposed by the DateTimeSerializationSection class.

Name Description
Location (Inherited from ConfigurationSection.) A key property.
Mode A read/write sint32 value that determines the serialization format for DateTime instances. The possible values are listed later in the Remarks section.
Path (Inherited from ConfigurationSection.) A key property.
SectionInformation (Inherited from ConfigurationSection.)

Subclasses

This class contains no subclasses.

Remarks

The following table lists the possible values for the Mode property.

Value Keyword Description
0 Default The same as Roundtrip.
1 Roundtrip The serializer examines the DateTime instance to determine whether the serialization format is Coordinated Universal Time (UTC), local, or unspecified, and it serializes the instance in such a way that this information is preserved. You should use this setting for all new applications that do not communicate with versions 1.0 or 1.1 of the .NET Framework.
2 Local The serializer formats all DateTime objects as local time. Note: In the .NET Framework 1.0 and 1.1, DateTime objects are always formatted as the local time. That is, local time zone information is always included with the serialized data. Use this setting to guarantee compatibility with the .NET Framework 1.0 and 1.1.

Inheritance Hierarchy

ConfigurationSection

DateTimeSerializationSection

Requirements

Type Description
Client - IIS 7.0 on Windows Vista
- IIS 7.5 on Windows 7
- IIS 8.0 on Windows 8
- IIS 10.0 on Windows 10
Server - IIS 7.0 on Windows Server 2008
- IIS 7.5 on Windows Server 2008 R2
- IIS 8.0 on Windows Server 2012
- IIS 8.5 on Windows Server 2012 R2
- IIS 10.0 on Windows Server 2016
Product - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0
MOF file WebAdministration.mof

See Also

ConfigurationSection Class
System.Xml.Serialization.Configuration.DateTimeSerializationSection.DateTimeSerializationMode Enumeration
System.DateTime Structure