DataRow.SetAdded 方法

定義

RowStateDataRow 變更為 AddedChanges the RowState of a DataRow to Added.

public:
 void SetAdded();
public void SetAdded ();
member this.SetAdded : unit -> unit
Public Sub SetAdded ()

備註

RowStateDataRow 變更為 AddedChanges the RowState of a DataRow to Added. 如果目前的資料列不在 UnchangedAdded 狀態中,則會擲回 InvalidOperationException,訊息為 SetAdded 只能在 DataRowRowStateUnchanged實例上叫用。If the current row is not in either an Unchanged or an Added state, it throws an InvalidOperationException with the message that SetAdded can only be invoked on a DataRow instance where the RowState is Unchanged.

適用於

另請參閱