CodeCopy

September 7, 2009

Binary Enum Issues

Filed under: c# — mazzoo @ 07:19
Tags: , , ,

Ever wondered how Binary Enums works ?

Binary enums are enums build up with the values 1, 2, 4, 8, 16, 32, 64, 128, 256, etc. The idea of binary enums are to be able to check if one or more of the enum values are set in a value.

An example:

Vehicle = 1, Car = 2, Motorcycle = 4

Value 3 => Vehicle + Car
(more…)

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.