1

Could someone help me explain what is happening here. Not entirely sure what instance is all about.... Wouldn't I/ Couldn't I just use a static class.

I would appreciate if the following code would be annotated

public class Dingo
{
    public static Dingo instanceDingo;

    private Dingo(){}

    private static Dingo Instance
    {
        get
        {
            return instanceDingo ?? (instanceDingo= new Dingo());
        }
    }
}
marwaha.ks
  • 540
  • 1
  • 7
  • 19

0 Answers0