Class destructor in C#
Forums:
class Resources {
//It called automatically
//when class instance is deallocated
~Resources() {
//release allocated resources
//eg close the connection to the database,
//close files, etc.
}
}
- Log in to post comments