Reputation: 113
Hi all I am declaring my datatable as DataTable dt=null
I would like to add columns to this datatable with out declaring it as dt=new DataTable();
is it possible to do this
Upvotes: 0
Views: 85
Reputation: 40970
is it possible to do this?
Answer : No
You can't access or use an object if it is null. You will get an null reference exception.
object reference not set to an instance of an object.
Upvotes: 1