I have a class (called Employee. non static) defined in a class library. I am instantiating that class in another project and calling some methods.
Is it okay to write a Dispose method in that class? The reason I wanted to write custom dispose method because I am calling a webservice inside Employee class.
public class Employee
{
SoapSample company = new SoapSample();
public Employee()
{
company.UserCredentials.UserName = "";
company.UserCredentials.Password = "";
}
}
You could just implement the IDisposable interface