The only advantage is, you can easy readability of an enum. So, you can easy
check it for certain returns without knowing the int values.
myReturn == myEnum.Failed
However, using a enum won't guarantee you returning values outside of enum.
(for some reason c# does not provide this check)
--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"thechaosengine" <sh856531@microsofts_free_email_service.com> wrote in
message news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi all,
I have a property called GeneralStatus that can return an int between -1
and 3.
These values are represented by an enumeration called StatusEnum.
My question is, should my property definition return a int (the underlying
type of the enum) or should I return the enum itself.
What would returning the enum achieve?
Many thanks
tce