suppose i have a class i want as a singleton, and i write:

Code:
class Thing{
  static Thing me;

  private Thing(string param){
    //do some stuff
  } 

  static getInstance(){
    if(me ==null)
      me = new Thing();

    return me;
  }
}
how do i now inherit this. the new inherited version needs to have a constructor that does something different.. i cant override getInstance in the child class, to call new ChildThing() because static methods cannot be overridden

Code:
class ChildThing : Thing{
  

  private ChildThing(string param){
    //do some more stuff
  } 

  static override getInstance(){
    if(base.me ==null)
      base.me = new ChildThing();

    return base.me;
  }
}

so how does one write a singleton that is inheritable?