I recently learned the C programming standard for method return values:
0 if the method completed successfully,
<0 the method encountered some internal error, and
>0 the method encountered some application error.
I was wondering how people implemented "Get" methods.
You can stick to the approach above and return the appropriate property value in a parameter passed by reference, but this is an awkward interface for the UI.
If you don't use this approach, then how do you tell the UI an error occured? I suppose you could return either the property value or some special value to indicate an error, but this also creates a "muddy" interface for the UI-- for example, the property value could be a different type than your error return value.
Thanks.
- Mark
----------
Mark Bucciarelli