I would like to initialize a list with a given number of items, all with value DBNull.Value, is this possible via AddRange?
This code initializes as nulls and not DBNull.Value
_cellList = new List<object>(new DBNull[_columns.Count]);
Whereas this does the job correctly, but with a for loop:
_cellList = new List<object>();
for(int i = 0; i<_columns.Count; i++)
{
_cellList.Add(DBNull.Value);
}
thanks