Need some help with this one.

Is it possible to define a class constructor in an interface? I need to ensure that any classes that use a specific interface all have at least one constructor with specific parameters. Is there a different option that can yield the same outcome?

No, you can't. Best you can do is method with those parameters.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.