Is dispose necessary in this scenario with datasets and adapters?

  • Thread starter Thread starter pkellnernews
  • Start date Start date
P

pkellnernews

I typically make calls like this:

UsersTableAdapter usersTableAdapter = new UsersTableAdapter();
DataSetUsers.UsersDataTable usersDataTable
= usersTableAdapter.GetById(idUser);

Is it necessary (or recommended) to do this:

usersDataTable.DisplayExpression();
usersTableAdapter.Dispose();

Thanks,

Peter Kellner
http://peterkellner.net
Peter Kellner
http://peterkellner.net
 
IDisposable is a contract meaning you have to call Dispose to be on the safe
side.
 
Back
Top