Try the following.
public static class Extensions
{
public static T IIf<T>(this bool expression, T truePart, T falsePart)
=> expression ? truePart : falsePart;
}
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello everyone,
CS8370 Feature 'static local functions' is not available in C# 7.3. Please use language version 8.0 or greater.
Can someone please guide me on how to fix this issue?
Try the following.
public static class Extensions
{
public static T IIf<T>(this bool expression, T truePart, T falsePart)
=> expression ? truePart : falsePart;
}