CryptographicException コンストラクタ ()
アセンブリ: mscorlib (mscorlib.dll 内)
構文
解説
使用例
パラメータを指定せずに CryptographicException を生成する方法を次のコード例に示します。このコード例は、CryptographicException クラスのトピックで取り上げているコード例の一部分です。
CryptographicException^ cryptographicException = gcnew CryptographicException;
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
CryptographicException コンストラクタ (String)
アセンブリ: mscorlib (mscorlib.dll 内)
構文
解説
使用例
カスタムのエラー メッセージを使用して CryptographicException を生成する方法を次のコード例に示します。このコード例は、CryptographicException クラスのトピックで取り上げているコード例の一部分です。
Dim errorMessage As String = "Unexpected Operation exception." Dim cryptographicException As New CryptographicException(errorMessage)
string errorMessage = ("Unexpected Operation exception."); CryptographicException cryptographicException = new CryptographicException(errorMessage);
String^ errorMessage = (L"Unexpected Operation exception."); CryptographicException^ cryptographicException = gcnew CryptographicException( errorMessage );
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
CryptographicException コンストラクタ (Int32)
アセンブリ: mscorlib (mscorlib.dll 内)
構文
解説
CryptographicException コンストラクタは、システム HRESULT エラー コードを受け取り、HRESULT に対応するローカライズされたメッセージを Message プロパティに設定します。
CryptographicException のインスタンスの初期プロパティ値を次の表に示します。
CryptographicUnexpectedOperationException に対するエラー コードを使用して CryptographicException を生成する方法を次のコード例に示します。このコード例は、CryptographicException クラスのトピックで取り上げているコード例の一部分です。
Dim exceptionNumber As Integer = &H80131431 Dim cryptographicException As _ New CryptographicException(exceptionNumber)
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
CryptographicException コンストラクタ (String, Exception)
アセンブリ: mscorlib (mscorlib.dll 内)
構文
Dim message As String Dim inner As Exception Dim instance As New CryptographicException(message, inner)
前の例外の直接の結果としてスローされる例外については、InnerException プロパティに、前の例外への参照が格納されます。InnerException プロパティは、コンストラクタに渡されたものと同じ値を返します。InnerException プロパティによって内部例外値がコンストラクタに渡されなかった場合は、null 参照 (Visual Basic では Nothing) を返します。
CryptographicException のインスタンスの初期プロパティ値を次の表に示します。
カスタムのエラー メッセージおよび内部例外を使用して CryptographicException を生成する方法を次のコード例に示します。このコード例は、CryptographicException クラスのトピックで取り上げているコード例の一部分です。
Dim errorMessage As String = "The current operation is not supported." Dim nullException As New NullReferenceException Dim cryptographicException As _ New CryptographicException(errorMessage, nullException)
string errorMessage = ("The current operation is not supported."); NullReferenceException nullException = new NullReferenceException(); CryptographicException cryptographicException = new CryptographicException(errorMessage, nullException);
String^ errorMessage = (L"The current operation is not supported."); NullReferenceException^ nullException = gcnew NullReferenceException; CryptographicException^ cryptographicException = gcnew CryptographicException( errorMessage,nullException );
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
CryptographicException コンストラクタ (SerializationInfo, StreamingContext)
アセンブリ: mscorlib (mscorlib.dll 内)
構文
Dim info As SerializationInfo Dim context As StreamingContext Dim instance As New CryptographicException(info, context)
プラットフォーム
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
CryptographicException コンストラクタ
オーバーロードの一覧
名前 | 説明 |
---|---|
CryptographicException () | CryptographicException クラスの新しいインスタンスを既定のプロパティを使用して初期化します。 .NET Compact Framework によってサポートされています。 |
CryptographicException (Int32) | HRESULT エラー コードを指定して、CryptographicException クラスの新しいインスタンスを初期化します。 .NET Compact Framework によってサポートされています。 |
CryptographicException (String) | 指定したエラー メッセージを使用して、CryptographicException クラスの新しいインスタンスを初期化します。 .NET Compact Framework によってサポートされています。 |
CryptographicException (SerializationInfo, StreamingContext) | シリアル化したデータを使用して、CryptographicException クラスの新しいインスタンスを初期化します。 |
CryptographicException (String, Exception) | 指定したエラー メッセージと、この例外の原因である内部例外への参照を使用して、CryptographicException クラスの新しいインスタンスを初期化します。 .NET Compact Framework によってサポートされています。 |
CryptographicException (String, String) | エラー メッセージとその書式を指定して、CryptographicException クラスの新しいインスタンスを初期化します。 .NET Compact Framework によってサポートされています。 |
CryptographicException コンストラクタ (String, String)
アセンブリ: mscorlib (mscorlib.dll 内)
構文
Dim format As String Dim insert As String Dim instance As New CryptographicException(format, insert)
使用例
時刻の形式および現在の日付を使用して CryptographicException を生成する方法を次のコード例に示します。このコード例は、CryptographicException クラスのトピックで取り上げているコード例の一部分です。
Dim dateFormat As String = "{0:t}" Dim timeStamp As String = DateTime.Now.ToString() Dim cryptographicException As _ New CryptographicException(dateFormat, timeStamp)
string dateFormat = "{0:t}"; string timeStamp = (DateTime.Now.ToString()); CryptographicException cryptographicException = new CryptographicException(dateFormat, timeStamp);
String^ dateFormat = L"{0:t}"; String^ timeStamp = (DateTime::Now.ToString()); CryptographicException^ cryptographicException = gcnew CryptographicException( dateFormat,timeStamp );
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
- CryptographicException コンストラクタ ()のページへのリンク