Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » C# Programming   (RSS)

A C# library to write functional code - Part V - The Match operator

Other posts in the series: Part I - Background Part II - Tuples Part III - Records Part IV - Type Unions Part V - The Match operator This is my last post of this series. It is about the match operator. To the untrained eyes this operator might look like
Posted by lucabol | 3 Comments
Filed under:

A C# library to write functional code - Part IV - Type Unions

Other posts in the series: Part I - Background Part II - Tuples Part III - Records Part IV - Type Unions Part V - The Match operator I'm sorry for my prolonged absence in the middle of this series of posts. I'm on a long paternity leave in Italy (playing
Posted by lucabol | 10 Comments
Filed under:

A C# library to write functional code - Part III - Records

Other posts in the series: Part I - Background Part II - Tuples Part III - Records Part IV - Type Unions Part V - The Match operator Now that we know what Tuples are, we can start talking about Record, as they use a derivative of Tuples under the cover.
Posted by lucabol | 13 Comments
Filed under:

A C# library to write functional code - Part II - Tuples

Other posts in the series: Part I - Background Part II - Tuples Part III - Records Part IV - Type Unions Part V - The Match operator Tuples are a way for you not to name things. In Object Oriented languages you got to name everything. If you need to represent
Posted by lucabol | 16 Comments
Filed under:

Attachment(s): Functional.zip

A C# library to write functional code - Part I - Background

Other posts in the series: Part I - Background Part II - Tuples Part III - Records Part IV - Type Unions Part V - The Match operator In December (slow time in msft) I decided to understand what functional programming is all about. When I say 'understanding'
Posted by lucabol | 15 Comments
Filed under:

"LINQ to SQL Overview" video

This is my presentation from TechEd Barcelona: http://www.microsoft.com/emea/msdn/spotlight/sessionh.aspx?videoid=716 . The European locale brings out my Italian accent ... On this page there are a bunch of interesting presentations (i.e. Anders on LINQ):
Posted by lucabol | 12 Comments
Filed under:

Creating an immutable value object in C# - Part V - Using a library

Other posts: Part I - Using a class Part II - Making the class better Part III - Using a struct Part IV - A class with a special value In the last post we presented a variation of implementing a value object using a class. Everything works (obviously),
Posted by lucabol | 12 Comments
Filed under:

Attachment(s): TimeLineUsingRecord.zip

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

Instead of a simple switch statement ...

This is Luke 's kind of code. I might be catching the virus ... abstract class QIFParserBase { public enum LoadOptions { All, Prices, Securities, Transactions } static readonly Dictionary < LoadOptions , Action < QIFParserBase , string []>>
Posted by lucabol | 5 Comments
Filed under:

Parsing QIF Quicken files in C#

I'm slightly prouder of the structure of this code than the one in the previous blog post . You can simply inherit from QIFParserBase and override a couple of abstract methods to customize the behavior. Still, I just tested it on a couple of test QIF
Posted by lucabol | 1 Comments
Attachment(s): ParseQIF.zip

Retrieve prices, dividends and splits for a stock in C#

I wrote this code very quickly and I'm kind of ashamed of it, but it gets the job done (I think). You need the HTML Agility Pack for the stock splits retrieving code. You can download it from here or you can simply comment out the code. I wrote it against
Posted by lucabol | 0 Comments
Attachment(s): PriceRetriever.zip
More Posts Next page »
 
Page view tracker