次の方法で共有


CryptographicUnexpectedOperationException コンストラクタ (String, Exception)

指定したエラー メッセージと、この例外の原因である内部例外への参照を使用して、CryptographicUnexpectedOperationException クラスの新しいインスタンスを初期化します。

名前空間: System.Security.Cryptography
アセンブリ: mscorlib (mscorlib.dll 内)

構文

'宣言
Public Sub New ( _
    message As String, _
    inner As Exception _
)
'使用
Dim message As String
Dim inner As Exception

Dim instance As New CryptographicUnexpectedOperationException(message, inner)
public CryptographicUnexpectedOperationException (
    string message,
    Exception inner
)
public:
CryptographicUnexpectedOperationException (
    String^ message, 
    Exception^ inner
)
public CryptographicUnexpectedOperationException (
    String message, 
    Exception inner
)
public function CryptographicUnexpectedOperationException (
    message : String, 
    inner : Exception
)
適用できません。

パラメータ

  • message
    例外の原因を説明するエラー メッセージ。
  • inner
    現在の例外の原因である例外。inner パラメータが null 参照 (Visual Basic では Nothing) でない場合は、内部例外を処理する catch ブロックで現在の例外が発生します。

解説

前の例外の直接の結果としてスローされる例外については、InnerException プロパティに、前の例外への参照が格納されます。InnerException プロパティは、コンストラクタに渡されたものと同じ値を返します。InnerException プロパティによって内部例外値がコンストラクタに渡されなかった場合は、null 参照 (Visual Basic では Nothing) を返します。

CryptographicUnexpectedOperationException のインスタンスの初期プロパティ値を次の表に示します。

プロパティ

InnerException

内部例外参照。

Message

エラー メッセージ文字列。

使用例

カスタムのエラー メッセージおよび内部例外を使用して CryptographicUnexpectedOperationException を生成する方法を次のコード例に示します。このコード例は、CryptographicUnexpectedOperationException クラスのトピックで取り上げているコード例の一部分です。

Dim errorMessage As String = "The current operation is not supported."
Dim nullException As New NullReferenceException
Dim cryptographicException As _
    New CryptographicUnexpectedOperationException( _
    errorMessage, nullException)
string errorMessage = ("The current operation is not supported.");
NullReferenceException nullException = new NullReferenceException();
CryptographicUnexpectedOperationException cryptographicException = 
    new CryptographicUnexpectedOperationException(
    errorMessage, nullException);

プラットフォーム

Windows 98,Windows Server 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

Microsoft .NET Framework 3.0 は Windows Vista,Microsoft Windows XP SP2,および Windows Server 2003 SP1 でサポートされています。

バージョン情報

.NET Framework

サポート対象 : 3.0,2.0,1.1,1.0

.NET Compact Framework

サポート対象 : 2.0

参照

関連項目

CryptographicUnexpectedOperationException クラス
CryptographicUnexpectedOperationException メンバ
System.Security.Cryptography 名前空間
Exception

その他の技術情報

例外の処理とスロー