Table of Contents

Class ResetBitExtension

Namespace
Loehnert.Utility.Extensions
Assembly
Loehnert.Utility.dll

Extensions for resetting an bit.

public static class ResetBitExtension
Inheritance
ResetBitExtension
Inherited Members

Methods

ResetBit(byte, int)

Resets the bit at the position.

public static byte ResetBit(this byte value, int position)

Parameters

value byte

Value to reset a bit.

position int

Bit position.

Returns

byte

The value with the bit reset.

Exceptions

ArgumentOutOfRangeException

Thrown when position is not between 0 and 7.

ResetBit(ushort, int)

Resets the bit at the position.

public static ushort ResetBit(this ushort value, int position)

Parameters

value ushort

Value to reset a bit.

position int

Bit position.

Returns

ushort

The value with the bit reset.

Exceptions

ArgumentOutOfRangeException

Thrown when position is not between 0 and 15.

ResetBit(uint, int)

Resets the bit at the position.

public static uint ResetBit(this uint value, int position)

Parameters

value uint

Value to reset a bit.

position int

Bit position.

Returns

uint

The value with the bit reset.

Exceptions

ArgumentOutOfRangeException

Thrown when position is not between 0 and 31.