How to return 1 of many possibilities from method
<p>I have a login procedure, which can result in multiple results: </p>

<ul>
<li>User not activated</li>
<li>Unknown username</li>
<li>Invalid password</li>
<li>Valid password</li>
</ul>

<p>I'm thinking about how I would design the method. I see these options</p>

<ul>
<li><p>One method for each possibility (like IsUserActivated, IsUsernameKnown..). This seems to violate "Tell don't ask" principle, I don't know I just don't like it.</p></li>
<li><p>Throw custom exception for each possibility (like UserNotActivatedException, UserUnknownException..). This also seems wrong to me.</p></li>
<li><p>Return custom ValidationResult class</p></li>
<li><p>Return custom enum</p></li>
</ul>

<p>Ideas? :-)</p>

<p>Also feel free to edit the subject (and tags)</p>
