Skip to the content.

Terminology: factory method is a static method that returns an instance of a type.

It looks like you have multiple factory methods on a type marked [ExplicitConstructor]; that’s just confusing! Pick one, and remove the attribute from the others. This should probably be the one with the most parameters.

Bad:

class MyType
{
    public int A { get; private set; }

    [ExplicitConstructor]
    public static MyType Create1(int a) => new MyType { A = a };

    [ExplicitConstructor]
    public static MyType Create2(int a) => new MyType { A = a };
}

Good:

class MyType
{
    public int A { get; private set; }

    [ExplicitConstructor]
    public static MyType Create1(int a) => new MyType { A = a };

    public static MyType Create2(int a) => new MyType { A = a };
}