Click here to Skip to main content
15,902,447 members
Home / Discussions / C#
   

C#

 
AnswerRe: String issue.. Pin
Luc Pattyn10-Feb-09 7:16
sitebuilderLuc Pattyn10-Feb-09 7:16 
GeneralRe: String issue.. Pin
Ravadre10-Feb-09 7:19
Ravadre10-Feb-09 7:19 
AnswerRe: String issue.. Pin
Luc Pattyn10-Feb-09 7:21
sitebuilderLuc Pattyn10-Feb-09 7:21 
AnswerRe: String issue.. Pin
lawrenceinba10-Feb-09 19:11
lawrenceinba10-Feb-09 19:11 
GeneralRe: String issue.. Pin
ventomito11-Feb-09 4:37
ventomito11-Feb-09 4:37 
QuestionURL holder for a web crawler. Pin
emmmatty110-Feb-09 6:34
emmmatty110-Feb-09 6:34 
AnswerRe: URL holder for a web crawler. Pin
musefan10-Feb-09 6:49
musefan10-Feb-09 6:49 
QuestionNeed Help getting bits from bytes. Pin
Muratus10-Feb-09 6:34
Muratus10-Feb-09 6:34 
Well, I'm about to pull my hair out on this. So I figured I'd post for help before I cause some premature baldness.

I'm fairly new to C# and have run into this problem trying to get info out of a int byte that I get returned.

Here is what is stated in the lib that I'm working with:



The first three bits represent a single value, not flags.
For example Auction (0x05) is not a combination of OwnedByOther (0x01) and ForSale(0x04). However, the BorderWest and BorderSouth values are bit flags that get attached to the value stored in the first three bits. Bits four, five, and six are unused.

public enum OverlayType : byte
{ Public = 0,
OwnedByOther = 1,
OwnedByGroup = 2,
OwnedBySelf = 3,
ForSale = 4,
Auction = 5,
BorderWest = 64,
BorderSouth = 128
}

So where I'm lost is trying to get the first 3 bits out and get the enum OverlayType from them. Plus the BoarderWest & BorderSouth.
AnswerRe: Need Help getting bits from bytes. Pin
musefan10-Feb-09 6:48
musefan10-Feb-09 6:48 
AnswerRe: Need Help getting bits from bytes. Pin
Ennis Ray Lynch, Jr.10-Feb-09 7:12
Ennis Ray Lynch, Jr.10-Feb-09 7:12 
AnswerRe: Need Help getting bits from bytes. Pin
Ravadre10-Feb-09 7:15
Ravadre10-Feb-09 7:15 
GeneralRe: Need Help getting bits from bytes. [modified] Pin
Muratus10-Feb-09 7:40
Muratus10-Feb-09 7:40 
GeneralRe: Need Help getting bits from bytes. Pin
Ravadre10-Feb-09 9:24
Ravadre10-Feb-09 9:24 
GeneralRe: Need Help getting bits from bytes. Pin
Muratus10-Feb-09 9:56
Muratus10-Feb-09 9:56 
GeneralRe: Need Help getting bits from bytes. Pin
Ravadre10-Feb-09 10:14
Ravadre10-Feb-09 10:14 
GeneralRe: Need Help getting bits from bytes. Pin
Muratus10-Feb-09 10:53
Muratus10-Feb-09 10:53 
AnswerRe: Need Help getting bits from bytes. [modified] Pin
#realJSOP10-Feb-09 9:59
professional#realJSOP10-Feb-09 9:59 
AnswerRe: Need Help getting bits from bytes. Pin
Alan N10-Feb-09 14:59
Alan N10-Feb-09 14:59 
QuestionUpload file to sharepoint without/without sharepoint.dll Pin
Burdzy10-Feb-09 6:17
Burdzy10-Feb-09 6:17 
AnswerRe: Upload file to sharepoint without/without sharepoint.dll Pin
musefan10-Feb-09 6:28
musefan10-Feb-09 6:28 
GeneralRe: Upload file to sharepoint without/without sharepoint.dll Pin
Burdzy10-Feb-09 6:48
Burdzy10-Feb-09 6:48 
QuestionNetwork info Pin
Froz3n10-Feb-09 5:58
Froz3n10-Feb-09 5:58 
QuestionStreamReader.ReadLine() Pin
staticv10-Feb-09 5:19
staticv10-Feb-09 5:19 
AnswerRe: StreamReader.ReadLine() Pin
Dave Kreskowiak10-Feb-09 5:25
mveDave Kreskowiak10-Feb-09 5:25 
AnswerRe: StreamReader.ReadLine() Pin
Rob Philpott10-Feb-09 5:28
Rob Philpott10-Feb-09 5:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.