Using a Function to emulate F# Match in C# So this was inspired by:
this question
But doesn't actually answer it:
What do you think of:

public class Case&lt;TRes&gt;
{
    public Case(bool condition, Func&lt;TRes&gt; result)
    {
        Condition = condition;
        Result = result;
    }
    public bool Condition {get; private set;}
    public Func&lt;TRes&gt; Result { get; private set; }

    public static Case&lt;TRes&gt; Default(Func&lt;TRes&gt; value)
    {
        return new Case&lt;TRes&gt;(true, value);
    }
}

public static class Logic
{
    public static T Match&lt;T&gt; (params Case&lt;T&gt;[] cases)
    {
        return cases.First(c =&gt; c.Condition).Result();
    }
}


Which you could invoke:

int i = Logic.Match
(
    new Case&lt;int&gt;(IsCloudy(skyImage), () =&gt;
    {
        ChangeWeatherIcon(Icons.Clouds);
        return 13;
    }),
    new Case&lt;int&gt;(a &lt; b, () =&gt; a),
    Case&lt;int&gt;.Default(() =&gt; {throw new Exception(); })
);


it's purpose isn't quiet to emulate F#'s Match.
(Because F# match doens't actually take conditions, it is a stuctural/pattern match)
So really its kind of like the trinary operator, meets the nonOrdinal Select statment.

Anyone got any idea's on how to make it work cleaner? Maybe getting a way to get rid of the new's and the brackets
To be honest, it's pretty much impossible to do elegant pattern matching in a language that doesn't support it (e.g., C#).  The problem with what you've written there is it's more complicated than the equivalent if-then-else chain:

if (IsCloudy(skyImage)) {
    ChangeWeatherIcon(Icons.Clouds);
    return 13;
}
if (a &lt; b) {
    throw new Exception();
}


Now, I would dearly love to see some later version of C# adopt algebraic data types (a la F#) with pattern matching, but until then I very much doubt you'll be able to do better than if-then-else chains.