var area = figure switch
{
Line _ => 0,
Rectangle r => r.Width * r.Height,
Circle c => c.Radius * 2.0 * Math.PI,
_ => throw new UnknownFigureException(figure)
};
So more and more of F# is making it's way to C#. Between this and better tuple literals, I'm very happy about this!(I still need to get around to learning F# for real though, I really love it's brevity.)