[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

OverflowExceptionとは? わかりやすく解説

OverflowException クラス

checked コンテキストで、算術演算キャスト演算、または変換演算結果オーバーフロー発生した場合スローされる例外

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

<SerializableAttribute> _
<ComVisibleAttribute(True)> _
Public Class OverflowException
    Inherits ArithmeticException
Dim instance As OverflowException
[SerializableAttribute] 
[ComVisibleAttribute(true)] 
public class OverflowException : ArithmeticException
[SerializableAttribute] 
[ComVisibleAttribute(true)] 
public ref class OverflowException : public
 ArithmeticException
/** @attribute SerializableAttribute() */ 
/** @attribute ComVisibleAttribute(true) */ 
public class OverflowException extends ArithmeticException
SerializableAttribute 
ComVisibleAttribute(true) 
public class OverflowException extends
 ArithmeticException
解説解説

オーバーフロー検出する言語場合OverflowException 例外としてスローさます。たとえば C# では、checked キーワードを使用してオーバーフロー状態を検出します。OverflowException 例外は、checked コンテキストだけで発生します

次の MSIL (Microsoft Intermediate Language) 命令は、OverflowExceptionスローます。

整数型または小数型の算術演算変換による結果が、演算後の型の範囲外である場合次の事態発生します

OverflowException は、値 0x80131516 を保持する HRESULT COR_E_OVERFLOW を使用します

OverflowExceptionインスタンス初期プロパティ値の一覧については、OverflowException コンストラクタトピック参照してください

継承階層継承階層
System.Object
   System.Exception
     System.SystemException
       System.ArithmeticException
        System.OverflowException
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

OverflowException コンストラクタ ()


OverflowException コンストラクタ (String)

指定したエラー メッセージ使用して、OverflowException クラス新しインスタンス初期化します。

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

解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
OverflowException クラス
OverflowException メンバ
System 名前空間

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

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

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

Public Sub New ( _
    message As String, _
    innerException As Exception _
)
Dim message As String
Dim innerException As Exception

Dim instance As New OverflowException(message,
 innerException)
public OverflowException (
    string message,
    Exception innerException
)
public:
OverflowException (
    String^ message, 
    Exception^ innerException
)
public OverflowException (
    String message, 
    Exception innerException
)
public function OverflowException (
    message : String, 
    innerException : Exception
)

パラメータ

message

例外原因説明するエラー メッセージ

innerException

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

解説解説

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

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

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

OverflowException コンストラクタ (SerializationInfo, StreamingContext)

シリアル化したデータ使用して、OverflowException クラス新しインスタンス初期化します。

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

Protected Sub New ( _
    info As SerializationInfo, _
    context As StreamingContext _
)
Dim info As SerializationInfo
Dim context As StreamingContext

Dim instance As New OverflowException(info,
 context)
protected OverflowException (
    SerializationInfo info,
    StreamingContext context
)
protected:
OverflowException (
    SerializationInfo^ info, 
    StreamingContext context
)
protected OverflowException (
    SerializationInfo info, 
    StreamingContext context
)
protected function OverflowException (
    info : SerializationInfo, 
    context : StreamingContext
)

パラメータ

info

シリアル化されたオブジェクト データ保持するオブジェクト

context

転送元または転送先に関すコンテキスト情報

解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

OverflowException コンストラクタ


OverflowException プロパティ


パブリック プロパティパブリック プロパティ

プロテクト プロパティプロテクト プロパティ
  名前 説明
プロテクト プロパティ HResult  特定の例外割り当てられているコード化数値である HRESULT を取得または設定します。 ( Exception から継承されます。)
参照参照

関連項目

OverflowException クラス
System 名前空間
Exception クラス

その他の技術情報

例外の処理とスロー

OverflowException メソッド


パブリック メソッドパブリック メソッド

プロテクト メソッドプロテクト メソッド
参照参照

関連項目

OverflowException クラス
System 名前空間
Exception クラス

その他の技術情報

例外の処理とスロー

OverflowException メンバ

checked コンテキストで、算術演算キャスト演算、または変換演算結果オーバーフロー発生した場合スローされる例外

OverflowException データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
プロテクト コンストラクタプロテクト コンストラクタ
  名前 説明
プロテクト メソッド OverflowException オーバーロードされますOverflowException クラス新しインスタンス初期化します。
パブリック プロパティパブリック プロパティ
プロテクト プロパティプロテクト プロパティ
  名前 説明
プロテクト プロパティ HResult  特定の例外割り当てられているコード化数値である HRESULT を取得または設定します。(Exception から継承されます。)
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

OverflowException クラス
System 名前空間
Exception クラス

その他の技術情報

例外の処理とスロー



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

「OverflowException」の関連用語

OverflowExceptionのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



OverflowExceptionのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS