Tutorial by Examples

Any time you instantiate a class that Implements IDisposable, you should call .Dispose1 on that class when you have finished using it. This allows the class to clean up any managed or unmanaged dependencies that it may be using. Not doing this could cause a memory leak. The Using keyword ensures th...
Sometimes, you have to create two Disposable objects in a row. There is an easy way to avoid nesting Using blocks. This code Using File As New FileStream("MyFile", FileMode.Append) Using Writer As New BinaryWriter(File) 'You code here Writer.Writer("Hello&quot...

Page 1 of 1