corcon
asked on
Handling bitmask values
Hello,
I'm searching for a logical syntax or method for handling following problem.
I have 3 values in bitmask format:
1 = A
2 = B
4 = C
Possible values are: 1, 2, 3, 4, 5, 6 and 7.
Now I want a kind of for-each-loop to insert the values A, B and/or C in the database.
Example 1:
Incoming value = 1
Single insert into database: A
Example 2:
Incoming value = 7
Three inserts into database: A, B and C.
What is the fastest way to do this in C# .net?
Thanks in advance.
I'm searching for a logical syntax or method for handling following problem.
I have 3 values in bitmask format:
1 = A
2 = B
4 = C
Possible values are: 1, 2, 3, 4, 5, 6 and 7.
Now I want a kind of for-each-loop to insert the values A, B and/or C in the database.
Example 1:
Incoming value = 1
Single insert into database: A
Example 2:
Incoming value = 7
Three inserts into database: A, B and C.
What is the fastest way to do this in C# .net?
Thanks in advance.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER