Tag Archive: c#

Microsoft .NET

When is it appropriate to override ToString?

This question was asked on StackOverflow. Because my answer was upvoted well, I decided include it as a blog post. First, let’s talk about what ToString actually is. The ToString method lives in System.Object, and because System.Object is the base…
Read more

Microsoft .NET

Math in C# using the Quadratic Formula

Simple enough. If you want to ensure exact order translate the local variable function Func(Of double,double,double,Tuple(Of double,double)) to an actual member function or static function.

Microsoft .NET

Adding extension method support for .NET 2.0

.NET Framework 2.0 does not support extension methods out of the box, because you cannot reference System.Core that was introduced in .NET 3.5. However, by adding a simple attribute class you can use extension methods in .NET 2.0 as well….
Read more