Best practices for negative enumeration values


i need create enumeration contains negative values.

i need add member called "none" 0 value satisfy ca1008:

ca1008 enums should have 0 value
add member has value of 0 suggested name of 'none'.

what best practice including negative enumeration values?  should come numerically before none? i.e., should add none after negatives or before?

with positive values sequence clear.

thanks.


i think highest negative ones should come first followed lowest ones , last none.

    enum testenum     {         minusfour = -4,         minusthree = -3         minustwo = -2         minusone      }


please mark post answer if solved problem. happy programming!



Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'