Should I Dispose() DataSet and DataTable?

前端 未结 12 1342
清酒与你
清酒与你 2020-11-22 02:45

DataSet and DataTable both implement IDisposable, so, by conventional best practices, I should call their Dispose() methods.

However, from what I\'ve read so far, Da

12条回答
  •  借酒劲吻你
    2020-11-22 03:03

    No need to Dispose() because DataSet inherit MarshalByValueComponent class and MarshalByValueComponent implement IDisposable Interface

提交回复
热议问题