Porting Java version of Either to C#