[DebuggerHidden] can be used for a property, and this property appears to behave as you would like:
[DebuggerHidden] private static Func<int> random { get { return () => 4; } }
This is a workaround, as is another answer; however, it retains the lambda and may be closer to the original intention.
source share