TimeZoneNotFoundException クラス
定義
タイム ゾーンが見つからない場合にスローされる例外。The exception that is thrown when a time zone cannot be found.
public ref class TimeZoneNotFoundException : Exception
public class TimeZoneNotFoundException : Exception
[System.Serializable]
public class TimeZoneNotFoundException : Exception
type TimeZoneNotFoundException = class
inherit Exception
[<System.Serializable>]
type TimeZoneNotFoundException = class
inherit Exception
Public Class TimeZoneNotFoundException
Inherits Exception
- 継承
- 属性
注釈
この例外は、 ConvertTimeBySystemTimeZoneId FindSystemTimeZoneById ローカルシステムでタイムゾーン識別子が見つからない場合、または特定のタイムゾーン識別子に関連付けられたデータが存在しない場合に、メソッドおよびメソッドによってスローされます。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.
レジストリは Windows XP および Windows Vista のタイムゾーン情報のリポジトリとして機能するため、この例外は、レジストリに特定のタイムゾーンに関する情報が含まれていないことを示します。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. タイムゾーン情報は HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Time Zones のサブキーに格納されます。Time zone information is stored in the subkeys of HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Time Zones.
アプリケーションが特定のタイムゾーンの存在に依存していて、それを取得しようとすると、がスローされると TimeZoneNotFoundException 、アプリケーションは次の2つの方法のいずれかで例外を処理できます。If an application depends on the presence of a particular time zone and the attempt to retrieve it throws a TimeZoneNotFoundException, the application can handle the exception in either of two ways:
メソッドを呼び出して、 FromSerializedString 保存されたオブジェクトを逆シリアル化し TimeZoneInfo ます。By calling the FromSerializedString method to deserialize a saved TimeZoneInfo object.
メソッドのいずれかのオーバーロードを呼び出して CreateCustomTimeZone タイムゾーンを作成する。By calling one of the overloads of the CreateCustomTimeZone method to create a time zone.
メソッドとメソッドの例を参照してください TimeZoneInfo.CreateCustomTimeZone(String, TimeSpan, String, String, String, TimeZoneInfo+AdjustmentRule[], Boolean) FromSerializedString 。See the examples for the TimeZoneInfo.CreateCustomTimeZone(String, TimeSpan, String, String, String, TimeZoneInfo+AdjustmentRule[], Boolean) and FromSerializedString methods.
コンストラクター
TimeZoneNotFoundException() |
システム提供のメッセージを使用して、TimeZoneNotFoundException クラスの新しいインスタンスを初期化します。Initializes a new instance of the TimeZoneNotFoundException class with a system-supplied message. |
TimeZoneNotFoundException(SerializationInfo, StreamingContext) |
シリアル化したデータから、TimeZoneNotFoundException クラスの新しいインスタンスを初期化します。Initializes a new instance of the TimeZoneNotFoundException class from serialized data. |
TimeZoneNotFoundException(String) |
指定したメッセージの文字列を使用して、TimeZoneNotFoundException クラスの新しいインスタンスを初期化します。Initializes a new instance of the TimeZoneNotFoundException class with the specified message string. |
TimeZoneNotFoundException(String, Exception) |
指定したエラー メッセージおよびこの例外の原因となった内部例外への参照を使用して、TimeZoneNotFoundException クラスの新しいインスタンスを初期化します。Initializes a new instance of the TimeZoneNotFoundException class with a specified error message and a reference to the inner exception that is the cause of this exception. |
プロパティ
Data |
例外に関する追加のユーザー定義情報を提供する、キーと値のペアのコレクションを取得します。Gets a collection of key/value pairs that provide additional user-defined information about the exception. (継承元 Exception) |
HelpLink |
この例外に関連付けられているヘルプ ファイルへのリンクを取得または設定します。Gets or sets a link to the help file associated with this exception. (継承元 Exception) |
HResult |
特定の例外に割り当てられているコード化数値である HRESULT を取得または設定します。Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (継承元 Exception) |
InnerException |
現在の例外の原因となる Exception インスタンスを取得します。Gets the Exception instance that caused the current exception. (継承元 Exception) |
Message |
現在の例外を説明するメッセージを取得します。Gets a message that describes the current exception. (継承元 Exception) |
Source |
エラーの原因となるアプリケーションまたはオブジェクトの名前を取得または設定します。Gets or sets the name of the application or the object that causes the error. (継承元 Exception) |
StackTrace |
呼び出し履歴で直前のフレームの文字列形式を取得します。Gets a string representation of the immediate frames on the call stack. (継承元 Exception) |
TargetSite |
現在の例外がスローされたメソッドを取得します。Gets the method that throws the current exception. (継承元 Exception) |
メソッド
Equals(Object) |
指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。Determines whether the specified object is equal to the current object. (継承元 Object) |
GetBaseException() |
派生クラスでオーバーライドされた場合、それ以後に発生する 1 つ以上の例外の根本原因である Exception を返します。When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions. (継承元 Exception) |
GetHashCode() |
既定のハッシュ関数として機能します。Serves as the default hash function. (継承元 Object) |
GetObjectData(SerializationInfo, StreamingContext) |
派生クラスでオーバーライドされた場合は、その例外に関する情報を使用して SerializationInfo を設定します。When overridden in a derived class, sets the SerializationInfo with information about the exception. (継承元 Exception) |
GetType() |
現在のインスタンスのランタイム型を取得します。Gets the runtime type of the current instance. (継承元 Exception) |
MemberwiseClone() |
現在の Object の簡易コピーを作成します。Creates a shallow copy of the current Object. (継承元 Object) |
ToString() |
現在の例外の文字列形式を作成して返します。Creates and returns a string representation of the current exception. (継承元 Exception) |
イベント
SerializeObjectState |
例外がシリアル化され、例外に関するシリアル化されたデータを含む例外状態オブジェクトが作成されたときに発生します。Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception. (継承元 Exception) |