Sorry no.
The simplest solution is to use two different method names to indicate the difference in behavior. Since the names of the methods in question are constructors, you have no control over the names, so you must change at least one of them to a regular method. For example:
public class Generics<T> { public T Member; public String ErrorMessage; public Generics(T member) { this.Member = member; } private Generics() {
Personally, I would change both constructors to static methods, so the difference in behavior is completely understandable to the user. However, if you change only one constructor, make it a mistake.
Christian hayter
source share