I follow a convention that I won\'t use any print statements in classes, but I have done a parameter validation in a constructor. Please tell me how to return that validatio
When a constructor receives an invalid argument, it's common to throw an exception. You can then catch this exception and parse the data it contains.
try { int input = -1; var myClass = new MyClass(input); } catch (ArgumentException ex) { // Validation failed. }