C# Expressional if statements, possible expansion? [closed]

You can work something out using lambda’s, but it will not be a clean syntax:

        return (chkStatus 
            ? (Func<object>)(() => { 
                  DoLog(cmd.CommandText); 
                  return obj; 
              })
            : () => null)();

Leave a Comment