How to Return Status in C#

I use the design pattern of returning a Status in a tuple with the exception or actual result I need to return like this, You don’t have to go “all out” like this Status example (I got bored one day). Basically 0 is none, neutral, or unknown.Anything less than 0 is a type of error.And… Continue reading How to Return Status in C#

Published
Categorized as How To

Easy Pattern to implement IDisposable

Here is my C# implementation for an easy way to implement the IDisposable pattern in your classes. Just override DisposeManaged() and/or DisposeNative() when needed. The embedded code shown below is pulled directly from my GitHub gist here.If any formatting is ‘off’ or links don’t work, contact the WordPress.com complaint department.