Creating an immutable value object in C# – Part IV – A class with a special value

Other posts: Part I – Using a class Part II – Making the class better Part III – Using a struct In the last post we looked at structs as ways to implement immutable value objects and we discovered that they have several issues. A good thing about the struct implementation was the introduction of…

6

Creating an immutable value object in C# – Part III – Using a struct

Other posts: Part I – Using a class Part II – Making the class better Part IV – A class with a special value In Part II I talked about the asymmetry created by using ‘null’ as the special value for our little DateSpan domain. We also noticed the boredom of having to implement Equals,…

11

Bisection-based XIRR implementation in C#

Here is a quick implementation of XIRR (using Excel nomenclature) written in C#. Disclaimer: this is a super simple Bisection-based implementation. People tend to prefer the Newton method, but this is simpler and works for the app I’m writing. I decided to post it because I couldn’t find one on the net when I looked…

1

Creating an immutable value object in C# – Part II – Making the class better

Other posts: Part I – Using a class Part III – Using a struct Part IV – A class with a special value In the previous post I showed how to trivially implement a value object. The code works but it has several issues. Some are very simple, others are more interesting. Let’s take a…

16

Creating an immutable value object in C# – Part I – Using a class

Other posts: Part II – Making the class better Part III – Using a struct Part IV – A class with a special value Value objects are objects for which the identity is based on their state instead of their pointer in memory. For example, a numeric Complex class is, most of the time, a…

18