Welcome to MSDN Blogs Sign in | Join | Help

December 2007 - Posts

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
Posted by lucabol | 6 Comments
Filed under:

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
Posted by lucabol | 11 Comments
Filed under:

Attachment(s): TimeLineAsStruct.zip

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
Posted by lucabol | 1 Comments

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
Posted by lucabol | 16 Comments
Filed under:

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
Posted by lucabol | 18 Comments
Filed under:

Attachment(s): TimeLineAsClass - 1.zip
 
Page view tracker