An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
Try the following.
public static class Extensions
{
public static T IIf<T>(this bool expression, T truePart, T falsePart)
=> expression ? truePart : falsePart;
}