Noda Time
AmbiguousTimeException Class
NamespacesNodaTimeAmbiguousTimeException
Exception thrown to indicate that the specified local date/time occurs twice in a particular time zone due to daylight saving time changes.
Declaration Syntax
C#Visual BasicVisual C++
[SerializableAttribute]
public sealed class AmbiguousTimeException : ArgumentOutOfRangeException
<SerializableAttribute> _
Public NotInheritable Class AmbiguousTimeException _
	Inherits ArgumentOutOfRangeException
[SerializableAttribute]
public ref class AmbiguousTimeException sealed : public ArgumentOutOfRangeException
Members
All MembersConstructorsMethodsPropertiesEvents



IconMemberDescription
AmbiguousTimeException(ZonedDateTime, ZonedDateTime)
Constructs an instance from the given information.

ActualValue
Gets the argument value that causes this exception.
(Inherited from ArgumentOutOfRangeException.)
Data
Gets a collection of key/value pairs that provide additional user-defined information about the exception.
(Inherited from Exception.)
EarlierMapping
The earlier of the two occurrences of the local date and time within the time zone.

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()()
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
GetBaseException()()()()
When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions.
(Inherited from Exception.)
GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetObjectData(SerializationInfo, StreamingContext)
Sets the SerializationInfo object with the invalid argument value and additional exception information.
(Inherited from ArgumentOutOfRangeException.)
GetType()()()()
Gets the runtime type of the current instance.
(Inherited from Exception.)
HelpLink
Gets or sets a link to the help file associated with this exception.
(Inherited from Exception.)
HResult
Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception.
(Inherited from Exception.)
InnerException
Gets the Exception instance that caused the current exception.
(Inherited from Exception.)
LaterMapping
The later of the two occurrences of the local date and time within the time zone.

MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
Message
Gets the error message and the string representation of the invalid argument value, or only the error message if the argument value is null.
(Inherited from ArgumentOutOfRangeException.)
ParamName
Gets the name of the parameter that causes this exception.
(Inherited from ArgumentException.)
SerializeObjectState
Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception.
(Inherited from Exception.)
Source
Gets or sets the name of the application or the object that causes the error.
(Inherited from Exception.)
StackTrace
Gets a string representation of the immediate frames on the call stack.
(Inherited from Exception.)
TargetSite
Gets the method that throws the current exception.
(Inherited from Exception.)
ToString()()()()
Creates and returns a string representation of the current exception.
(Inherited from Exception.)
Zone
The time zone in which the local date and time is ambiguous.

Remarks

This occurs for transitions where the clock goes backward (usually by an hour). For example, suppose the time zone goes backward at 2am, so the second after 01:59:59 becomes 01:00:00. In that case, times such as 01:30:00 occur twice.

This exception is used to indicate such problems, as they're usually not the same as other ArgumentOutOfRangeException causes, such as entering "15" for a month number.

In theory this isn't calendar-specific; the local value will be ambiguous in this time zone regardless of the calendar used. However, this exception is always created in conjunction with a specific calendar, which leads to a more natural way of examining its information and constructing an error message.

Thread Safety
Any public static members of this type are thread safe. Any instance members are not guaranteed to be thread safe. See the thread safety section of the user guide for more information.
Inheritance Hierarchy

Assembly: NodaTime (Module: NodaTime) Version: 1.0.0.0 (1.0.1)