Can you imagine a situation when this code compiles and runs?
public void Reset()
{
this = new Foo();
}
See the result: https://dotnetfiddle.net/JheuMu.
Can you imagine a situation when this code compiles and runs?
public void Reset()
{
this = new Foo();
}
See the result: https://dotnetfiddle.net/JheuMu.
Recording from HAVIT Educational windows from 28th March 2019. Jiří Činčura presented the ref returns in C#.