I have an object that needs a test if the object data is valid. The validation itself would be called from the thread that instatiated the object, it looks like this:
{ if (_step.Equals(string.Empty)) return false; if (_type.Equals(string.Empty)) return false; if (_setup.Equals(string.Empty)) return false; return true; }
Would it be better to implement this as a property, or as a method, and why? I have read the answers to a related question, but I don’t think this specific question is covered there.
My personal opinion here would be: