About the eventName?.Invoke()

You may want to speak a bit more about the ? reference check, as it’s not as commonly known…

For example: showing the classic syntax

if(0nSelected!=null)
{
    onSelected.Invoke();
}

and how that is reduced to onSelected?.Invoke() using the ?.

1 Like

Sure thing, I can come back later and edit in a quick explanation :slight_smile:

1 Like

I thought that part was awesome, I’ve not seen that before and its so much better if !=null

Privacy & Terms