CSharp examples for System:Byte
Returns how many bytes are required to hold a certain number of bits
using System.Text; using System.Linq; using System.Collections.Generic; using System;//from w ww . java2 s .c o m public class Main{ /// <summary> /// Returns how many bytes are required to hold a certain number of bits /// </summary> public static int BytesToHoldBits(int numBits) { return (numBits + 7) / 8; } }