Representa la excepción que se produce al intentar devolver una versión de un objeto
DataRow que se ha eliminado.
Espacio de nombres: System.Data
Ensamblado: System.Data (en system.data.dll)

Sintaxis
Visual Basic (Declaración)
<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

Ejemplo
En el ejemplo siguiente se crea un DataTable con un DataColumn y 10 objetos DataRow. Después de eliminar un objeto DataRow, al intentar devolver la versión actual de la fila que se ha quitado se produce una excepción 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.");
}
}

Jerarquía de herencia

Seguridad para subprocesos
Los miembros estáticos públicos (
Shared en Visual Basic) de este tipo son seguros para la ejecución de subprocesos. No se garantiza que los miembros de instancias sean seguros para la ejecución de subprocesos.

Plataformas
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium, Windows Mobile para Pocket PC, Windows Mobile para Smartphone, Windows Server 2003, Windows XP Media Center, Windows XP Professional x64, Windows XP SP2, Windows XP Starter Edition
.NET Framework no admite todas las versiones de cada plataforma. Para obtener una lista de las versiones admitidas, vea Requisitos del sistema.

Información de versión
.NET Framework
Compatible con: 2.0, 1.1, 1.0
.NET Compact Framework
Compatible con: 2.0, 1.0

Vea también