Answer
IDisposable defines a contract for releasing unmanaged resources such as file handles, sockets, and database connections.
Implement IDisposable when your class owns unmanaged resources that the garbage collector cannot free automatically.
IDisposable defines a contract for releasing unmanaged resources such as file handles, sockets, and database connections.
Implement IDisposable when your class owns unmanaged resources that the garbage collector cannot free automatically.
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.
Sign in to access all features and personalize your learning experience.
Source: SugharaIQ