Blog

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

[csharp]namespace QuadraticFunc { using System; using System.Diagnostics; class Program { static void Main(string[] args) { Action<object> Print = (obj) => { Debug.WriteLine(obj.ToString()); }; // Returns Quadratic (+,-) Func<double, double, double, Tuple<double, double>> Quadratic = (a, b, c) => { double…
Read more