using (Disposable)

The using (Disposable) node is used for temporary usage objects with an IDisposable interface. It means, that this object will be destroyed after using and it will clean up all resources that are used by this object.


Using example

In this example we will read text from a file using the StreamReader class. After reading all text the StreamReader class instance will be destroyed:

Render time: 0.01 seconds
136,989 unique visits