C#C
C#3y ago
Matt

❔ What is the difference between these two pieces of code?

static PlayerHandler HPlayer => Program.HPlayer;

static PlayerHandler HPlayer = Program.HPlayer;

In essence I'm asking what the purpose of the lambda is here? I've used this pattern to help with a loose singleton pattern for a long time but I have no idea what this is even doing or why I use => over =
Was this page helpful?