Gemstone Common Library
Show/Hide TOC

# BitMathGetSetBitPositions(UInt32) Method

Returns the bit position for every bit that is set in the provided value. Bit positions are defined as 0-31;

## Definition

Namespace: Gemstone
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.162 -- Release Build+f11797ef017301be20d4b9376f78ac29ba38c21a
C#
View Source Request Example

    public static IEnumerable<int> GetSetBitPositions(
    	uint value
    )

VB
View Source Request Example

    Public Shared Function GetSetBitPositions (
    	value As UInteger
    ) As IEnumerable(Of Integer)

C++
View Source Request Example

    public:
    static IEnumerable<int>^ GetSetBitPositions(
    	unsigned int value
    )

JavaScript
View Source Request Example

    Gemstone.BitMath.GetSetBitPositions = function(value);

#### Parameters

value UInt32
  Target value for bit check enumeration.

#### Return Value

IEnumerable Int32
Enumeration of all set bit positions.

## See Also

#### Reference

BitMath Class
GetSetBitPositions Overload
Gemstone Namespace