development:csharp:byte_to_bin_and_vice_versa

no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


development:csharp:byte_to_bin_and_vice_versa [2021/05/19 12:17] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== C# Converting byte to binary string and vice versa ====== 
 +<code c#> 
 +string a = Convert.ToString(value, 2).PadLeft(8, '0');   // Convert byte (value) to binary string 
 +byte a = Convert.ToByte(NewFlags, 2);                    // Convert binary string to byte 
 +</code>
  • development/csharp/byte_to_bin_and_vice_versa.txt
  • Last modified: 2021/05/19 12:17
  • by 127.0.0.1