public void EndEdit()
{
DataTable myTable = new DataTable("myTable");
DataColumn dc = new DataColumn("Id", typeof(int));
dc.Unique = true;
myTable.Columns.Add(dc);
myTable.Rows.Add(new object[] { 1 });
myTable.Rows.Add(new object[] { 2 });
myTable.Rows.Add(new object[] { 3 });
DataRow myRow = myTable.Rows[0];
int iProposed;
//After calling the DataRow object's BeginEdit method, if you change the value, the Current and Proposed values become available
myRow.BeginEdit();
myRow[0] = 7;
iProposed = (int)myRow[0, DataRowVersion.Proposed];
myRow.EndEdit();
// EndEdit
Assert.Equal(iProposed, (int)myRow[0, DataRowVersion.Current]);
}