C# How to check if we've 'had' values from a method without having to re-call the method
I don't understand why you don't want to use a variable. However, one way is to provide an extension method for this:

public static void ForEachDo&lt;T&gt;(this IEnumerable&lt;T&gt; seq, Action&lt;T&gt; doWithEveryItem, Action doIfEmpty = null)
{
    bool isEmpty = true;
    foreach (T item in seq)
    {
        isEmpty = false;
        doWithEveryItem(item);
    }
    if (isEmpty &amp;&amp; doIfEmpty != null)
        doIfEmpty();
}


Now you can use it with everything that implements IEnumerable&lt;T&gt; like a string:

"".ForEachDo(Console.WriteLine, () =&gt; Console.WriteLine("No Events")); // prints "No Events"