C#

C# IDisposable Interface Implementation

Long long time ago I dissected the IDisposable interface (simple enough as it is) and made a "correct" implementation example essentially by commenting out MSDN code for better understanding what for and why you should do as it says:
class DisposableExample: IDisposable {
        #region Absolute minimum of the code required for correct implementation of IDisposable
        /// 
        /// Field that will be set to true if attempt to destroy the object was already made.
        /// 
        private bool isDisposed = false;

        /// 
Rating: 

.NET: XSLT transformation with formatted XML output (with indents and new lines)

Suppose you need to transform one XML string into another XML string. And output XML must be formatted: with new lines and indents. So you can do it like this:

Rating: 
Subscribe to RSS - C#