The exception that is thrown when a time zone cannot be found.
Assembly: mscorlib (in mscorlib.dll)
Initializes a new instance of theclass with a system-supplied message.
Initializes a new instance of theclass from serialized data.
Initializes a new instance of theclass with the specified message string.
Initializes a new instance of theclass with a specified error message and a reference to the inner exception that is the cause of this exception.
Gets a collection of key/value pairs that provide additional user-defined information about the exception.(Inherited from Exception.)
Gets or sets a link to the help file associated with this exception.(Inherited from Exception.)
Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception.(Inherited from Exception.)
Gets a message that describes the current exception.(Inherited from Exception.)
Gets or sets the name of the application or the object that causes the error.(Inherited from Exception.)
Gets a string representation of the immediate frames on the call stack.(Inherited from Exception.)
Gets the method that throws the current exception.(Inherited from Exception.)
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)
Serves as the default hash function. (Inherited from Object.)
Gets the runtime type of the current instance.(Inherited from Exception.)
Creates and returns a string representation of the current exception.(Inherited from Exception.)
This exception is thrown by the ConvertTimeBySystemTimeZoneId and FindSystemTimeZoneById methods when a time zone identifier cannot be found on the local system, or when there is no data associated with a particular time zone identifier.
Because the registry serves as the repository of time zone information in Windows XP and Windows Vista, this exception indicates that the registry contains no information about a particular time zone. Time zone information is stored in the subkeys of HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Time Zones.
If an application depends on the presence of a particular time zone and the attempt to retrieve it throws a, the application can handle the exception in either of two ways:
By calling one of the overloads of the CreateCustomTimeZone method to create a time zone.
See the examples for the TimeZoneInfo.CreateCustomTimeZone(String, TimeSpan, String, String, String, TimeZoneInfo.AdjustmentRule, Boolean) and FromSerializedString methods.
Available since 3.5
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.