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

VersionNotFoundException クラス

削除された DataRow のバージョン返そうとした場合スローされる例外表します

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

<SerializableAttribute> _
Public Class VersionNotFoundException
    Inherits DataException
Dim instance As VersionNotFoundException
[SerializableAttribute] 
public class VersionNotFoundException : DataException
[SerializableAttribute] 
public ref class VersionNotFoundException :
 public DataException
/** @attribute SerializableAttribute() */ 
public class VersionNotFoundException extends
 DataException
SerializableAttribute 
public class VersionNotFoundException extends
 DataException
使用例使用例

1 個の DataColumn オブジェクト10 個の DataRow オブジェクト使用して、DataTable を作成する例を次に示しますDataRow削除した後、削除した行の現在のバージョン返そうとすると、VersionNotFoundException 例外スローさます。

Private Sub DemonstrateVersionNotFoundException()
    ' Create a DataTable with one column.
    Dim table As New DataTable("NewTable")
    Dim column As New DataColumn("NewColumn")
    table.Columns.Add(column)
    Dim newRow As DataRow
    
    Dim i As Integer
    For i = 0 To 9
        newRow = table.NewRow()
        newRow("NewColumn") = i
        table.Rows.Add(newRow)
    Next i
    table.AcceptChanges()

    Try
        Console.WriteLine("Trying...")
        Dim removedRow As DataRow = table.Rows(9)
        removedRow.Delete()
        removedRow.AcceptChanges()

        ' Try to get the Current row version.
        Console.WriteLine(removedRow(0, DataRowVersion.Current))
    
    Catch e As System.Data.VersionNotFoundException
        Console.WriteLine("Current version of row not found.")
    End Try
End Sub 
private void DemonstrateVersionNotFoundException()
{
    // Create a DataTable with one column.
    DataTable table = new DataTable("NewTable");
    DataColumn column = new DataColumn("NewColumn");
    table.Columns.Add(column);
    DataRow newRow;
  
    for(int i = 0;i <10;i++)
    {
        newRow = table.NewRow();
        newRow["NewColumn"] = i;
        table.Rows.Add(newRow);
    }
    table.AcceptChanges();

    try
    {
        Console.WriteLine("Trying...");
        DataRow removedRow = table.Rows[9];
        removedRow.Delete();
        removedRow.AcceptChanges();
        // Try to get the Current row version.
        Console.WriteLine(removedRow[0,DataRowVersion.Current]);
 
    }
    catch(System.Data.VersionNotFoundException)
    {
        Console.WriteLine("Current version of row not found.");
    }
}
継承階層継承階層
System.Object
   System.Exception
     System.SystemException
       System.Data.DataException
        System.Data.VersionNotFoundException
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

VersionNotFoundException コンストラクタ ()


VersionNotFoundException コンストラクタ (String)


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

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

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

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

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

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

パラメータ

message

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

innerException

現在の例外の原因である例外内部例外指定されていない場合null 参照 (Visual Basic では、Nothing)。

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

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

シリアル化情報指定して、VersionNotFoundException クラス新しインスタンス初期化します。

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

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

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

パラメータ

info

オブジェクトシリアル化または逆シリアル化必要なデータ

context

指定したシリアル化ストリーム転送元と転送先の説明

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
VersionNotFoundException クラス
VersionNotFoundException メンバ
System.Data 名前空間
StreamingContext
SerializationInfo

VersionNotFoundException コンストラクタ

VersionNotFoundException クラス新しインスタンス初期化します。
オーバーロードの一覧オーバーロードの一覧

名前 説明
VersionNotFoundException () VersionNotFoundException クラス新しインスタンス初期化します。

.NET Compact Framework によってサポートされています。

VersionNotFoundException (String) 文字列指定してVersionNotFoundException クラス新しインスタンス初期化します。

.NET Compact Framework によってサポートされています。

VersionNotFoundException (SerializationInfo, StreamingContext) シリアル化情報指定してVersionNotFoundException クラス新しインスタンス初期化します。
VersionNotFoundException (String, Exception) 指定したエラー メッセージと、この例外原因である内部例外への参照使用してVersionNotFoundException クラス新しインスタンス初期化します。

.NET Compact Framework によってサポートされています。

参照参照

関連項目

VersionNotFoundException クラス
VersionNotFoundException メンバ
System.Data 名前空間

VersionNotFoundException プロパティ


VersionNotFoundException メソッド


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

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

関連項目

VersionNotFoundException クラス
System.Data 名前空間

VersionNotFoundException メンバ

削除された DataRow のバージョン返そうとした場合スローされる例外表します

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


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

関連項目

VersionNotFoundException クラス
System.Data 名前空間


このページでは「.NET Framework クラス ライブラリ リファレンス」からVersionNotFoundExceptionを検索した結果を表示しています。
Weblioに収録されているすべての辞書からVersionNotFoundExceptionを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からVersionNotFoundException を検索

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

辞書ショートカット

すべての辞書の索引

「VersionNotFoundException」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS