A
ahaupt
Hi all,
Consider the following scenario:
main()
{
DataTableCollection dtc = GetDataColumnCollection();
}
DataColumnCollection GetDataColumnCollection()
{
//..
//Use sql data adapter to populate a new data table
//..
return dataTable.Columns;
}
What happens with the dataTable object?
I assume that the all object, which does not have a reference to them
is added to the list (??) for grabage collection.
Thus the datatablecollection should remain, since there's a reference
to it. Is this correct?
Thanks for reading,
Andre
Consider the following scenario:
main()
{
DataTableCollection dtc = GetDataColumnCollection();
}
DataColumnCollection GetDataColumnCollection()
{
//..
//Use sql data adapter to populate a new data table
//..
return dataTable.Columns;
}
What happens with the dataTable object?
I assume that the all object, which does not have a reference to them
is added to the list (??) for grabage collection.
Thus the datatablecollection should remain, since there's a reference
to it. Is this correct?
Thanks for reading,
Andre