Multiple choice technology web technology

How to add auto increment column in the DataTable?

  1. auto.AutoIncrementSeed = 1

  2. auto.AutoIncrement = true

  3. auto.Increment = true;

  4. auto.IncrementSeed = 1;

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Setting AutoIncrement=true enables auto-increment for a DataColumn. The other options use incorrect property names or syntax. However, a complete implementation would also set AutoIncrementSeed and AutoIncrementStep properties. The question asks about basic enabling.