I think it is always added to the end of the collection.
However, if you want to be on the safe side then you should search rows
using unique key.
--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development
www.rthand.com
Blog:
http://cs.rthand.com/blogs/blog_with_righthand/
"JJ" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello NG
>
> I have the following code:
>
> DataTable dt = new DataTable();
> .... prepare the columns.
> DataRow rowNew = dt.NewRow();
> ...
> ...
> DataTable.Rows.Add(rowNew);
>
> My question, can i be sure that datatable.rows.add() method always adds to
> end of rows. So that if i need to get the row again, i can simply use the
> rowNew = dt.Rows[dt.Rows.Count-1];
>
> I know that I can drill the rows to locate the rowNew.RowState = Added but
> if I have more than one added row i can't use that.
>
> Kind regards.
> Johnny E. Jensen
>