Jcd.BitManipulation 1.0.30 The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved

Install-Package Jcd.BitManipulation -Version 1.0.30
dotnet add package Jcd.BitManipulation --version 1.0.30
<PackageReference Include="Jcd.BitManipulation" Version="1.0.30" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Jcd.BitManipulation --version 1.0.30
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Jcd.BitManipulation, 1.0.30"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Jcd.BitManipulation as a Cake Addin
#addin nuget:?package=Jcd.BitManipulation&version=1.0.30

// Install Jcd.BitManipulation as a Cake Tool
#tool nuget:?package=Jcd.BitManipulation&version=1.0.30
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Jcd.BitManipulation

A .Net Standard 2.1 library adding syntactic sugar to your bit manipulation experience.

Examples

ushort data=0b0000000000000000;
// turn on all the bits
data.SetBits(0,16);  // value is now 0b1111111111111111
// this is the equivalent as above
data.SetBits();

// Clear the middle 4 bits.
data.ClearBits(4,8); // value is now 0b1111000000001111

// Toggle all the bits.
data.ToggleBits(); // value is now 0b0000111111110000

// read the upper byte 
var upperByte = (byte) data.ReadBits(8,8); // upperByte is now 0b00001111

// write 0b1111 into the upper nybble
upperByte.StoreBits(0b00001111,4,4); // upperByte is now 0b11111111

Build, Code Stats and Nuget

GitHub Build status CodeFactor

MyGet Nuget

API Documentation

API Docs

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.30 142 10/11/2021
1.0.28 97 10/11/2021