All Questions
Tagged with c#-7.2 extension-methods
2
questions
7
votes
3
answers
994
views
What is the difference between "this ref" and "ref this" when talking about C# 7.2 ref extension methods?
Consider the following extension methods:
public static void Toggle(this ref bool @bool) => @bool = !@bool;
public static void Toggle2(ref this bool @bool) => @bool = !@bool;
These simply ...
4
votes
1
answer
583
views
C#. Ref returning delegate for ref extension method
I have the following extension method for monitoring a variable and awaiting until it has a given expected value:
public static async Task AwaitForValue<T>(this Func<T> ...