Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bit twiddling in C#
Message
De
15/02/2006 11:58:34
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
15/02/2006 11:56:34
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01096485
Message ID:
01096513
Vues:
18
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform