Get next autoincrement value for datatable column?

.net

Solution

If it fits in to your design, you can always create the new row (datatable.newrow) and it will already have assigned the nextId. It's now wasted but the row isn't committed to the table until you `AcceptChanges`.

Problem

I have a datatable with an AutoIncrement column. How can I get the next increment (-1,-2,-3,...) for the column without adding a new row?

Original source