Not sure if I understand, but if you are looking to see if a field allows
nulls or not (if not, you have to put something in it), then this should
work. However, if you have a defaultvalue, then it can no allow nulls but
still not be required per se.
foreach( DataColumn dc in dt.Columns )
{
listBox1.Items.Add(dc.ColumnName+" , "+dc.DataType +" ,"+dc.Unique +"
,"+dc.AutoIncrement+" ,"+dc.AllowDBNull + ", " + dc.DefaultValue );
}
}
dc.AllowDBNull will be true if it's not required.