"=?Utf-8?B?Tml0aW4gS29zaHk=?=" <ni********@mail.com> wrote in
news:E0**********************************@microsof t.com:
Cheers Chris...looks interesting.
I was thinking on using bit fields directly...
enum DataKind {dkSimple = 1, dkComplex = 2, dkCool = 4},
then do bitwise operations to manipulate the set, wherein the
set itself could be just integer variables int aSet =
((int)DataKind .dkSimple | (int)DataKind .dkCool ....etc
-Nitin
Yes, that can be done by using the FlagsAttribute:
[Flags]
enum DataKind {dkSimple = 1, dkComplex = 2, dkCool = 4};
int aSet = (int) (DataKind.dkSimple | DataKind.dkComplex);
--
Hope this helps.
Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/