Skip to content

IOFileComponent.SetBits Method ​

Overloads ​

NameDescription
SetBits(Int32, Byte, Int32, Int32)Sets a range of bits in the byte at the specified index.
SetBits<TEnum>(Int32, TEnum, Int32, Int32)Sets a range of bits in the byte at the specified index from an enum value.

SetBits(Int32, Byte, Int32, Int32) ​

Sets a range of bits in the byte at the specified index.

c#
protected void SetBits(int index, Byte value, int startInclusive, int endInclusive);

View source

Parameters ​

NameTypeDescription
indexInt32The index of the byte.
valueByteThe value to set.
startInclusiveInt32The start bit index, inclusive.
endInclusiveInt32The end bit index, inclusive.

SetBits<TEnum>(Int32, TEnum, Int32, Int32) ​

Sets a range of bits in the byte at the specified index from an enum value.

c#
protected void SetBits<TEnum>(int index, TEnum value, int startInclusive, int endInclusive)
   where TEnum : struct, Enum;

View source

Type Parameters ​

NameDescription
TEnumThe enum type.

Parameters ​

NameTypeDescription
indexInt32The index of the byte.
valueTEnumThe enum value to set.
startInclusiveInt32The start bit index, inclusive.
endInclusiveInt32The end bit index, inclusive.