add C# version

no concessions to trying to reduce the SLOC count