Creating default value for a component's input parameter, which's type is a custom class derived from GH_Goo<T>

I would like to ask that, is there any way to create default value for a component’s input parameter, which’s type is a custom class derived from GH_Goo?

I would need something like this:

class A {[…]}
class B : GH_Goo<A>{[…]}
public class BParam : GH_PersistentParam<B>{[…]}
public class A_to_Int : GH_Component
{
[…]
protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
{
pManager.AddParameter(new BParam(), “”,"","",GH_ParamAccess.item);
pManager[0].AddDefault(B.Default); //Can i do something like this???
}
[…]
}

Thanks for your answers in advance! Best regards, Matthew

you can “retroactively” add volatile data to default inputs

protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
{
    pManager.AddGenericParameter("A Thing", "A", "a thing you can use", GH_ParamAccess.item);
    pManager[0].Optional = true;
}

protected override void SolveInstance(IGH_DataAccess DA)
{
    object thething = null;
    if (!DA.GetData(0, ref thething))
    {
        thething = new MyThing();
        Params.Input[0].AddVolatileData(new GH_Path(0), 0, thething);
    }
}


class MyThing: IGH_Goo
{
    public MyThing()
    {
        
    }
}

but i haven’t tested this. just an idea