I’m having a mental block, can someone remind me what the correct term for returning early from a function is, i.e.
private MyObject DoSomeStuff(string myValue)
{
//What is this called?!?!?
if(myValue == string.Empty)
return null;
MyObject obj = new MyObject();
obj.Value = myValue;
return obj;
}
I believe it’s called a guard clause.