Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bit twiddling in C#
Message
From
15/02/2006 11:58:34
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
15/02/2006 11:56:34
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01096485
Message ID:
01096513
Views:
20
>Hmm... I think the question wasn't worded correctly. It should be, "I need to look at the left-most bit". Will this still work?
>
>>
>>(mybyte & 1) != 0
>>
>>Cetin

(mybyte & (1 << 7)) != 0

AFAIK byte structure doesn't have indexer for its bits to make this easier:(
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform