c# simplex class