Minor F# fixes
Added C# sample and fixes to F#
Merge pull request #3 from mrange/master

C# implementation