Click here to Skip to main content
15,891,136 members
Articles / Programming Languages / C#

C# Binary Literal Helper Class

Rate me:
Please Sign up or sign in to vote.
4.69/5 (13 votes)
22 Mar 2016CPOL2 min read 51.3K   11  
C# doesn't allow for binary literals (e.g. int bits = 0b00010101). With the helper class presented here, you can do something like that, as close as possible.

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Germany Germany
1985: "Hello world" on a Colour Genie
1989: Basic Balls of Mud on an Amiga 500
1994: C++ Big Balls of Mud on a PC
2005: C# Smaller Balls of Mud

Avatar image © dpa (licensed).



Comments and Discussions