ByteSize FromBits(int value)

Returns a ByteSize object initialized by size in Bits.

var size = ByteSize.FromBits(10000);

Source

static ByteSize FromBits(int value) =>
    ByteSize(value / _BitsInByte);