Hello everyone,
For example, my class Foo wraps an object of StreamWriter, I must make Foo implements IDisposable and in the Dispose method of class Foo, invoke Dispose method of the StreamWriter object instance to release resource properly?
Code:using System.IO; public class Foo : IDisposable { StreamWriter a; public Foo() { } public void Dispose { if (null != a) { a.Dispose(); } } }
thanks in advance,
George