Binary in C#: Storing and Displaying Binary Values in 10 minutes or less.
HTML-код
- Опубликовано: 4 окт 2024
- We are continuing our series on understanding binary in C# with lesson number three. In this video, we are going to store and display binary values in C# in 10 minutes or less.
Full Training Courses: IAmTimCorey.com
Source Code: leadmagnets.ap...
It would be interesting to cite real-life use cases in the next episodes. Great video though
Thanks!
Nice explanation:)
Thanks!
Easy! 😉
Great!
I use BitArray
👍
What is the point of storing binary values, what is the real world use of it? ☺ ☺
My example: Clients list with pagination. Changing page causes load another set of data. There's column with checkboxes used for selecting clients. BitArray helped me caching selections low cost.
Anything where you need high efficiency will be a potential candidate. For instance, using an Int32 to store the equivalent of 32 boolean values at once. Unity uses this technique when identifying layers. Each layer is a separate flag. It is incredibly efficient compared to 32 separate variables.
Another case is when using bit flags, easier to see the values as 0001, 0010, 0100, 1000... instead of 1, 2, 4, 16..., especially when combining them, 1011 is easier to understand than 19.
ineffable..!
Thanks!