Gemstone Common Library
Show/Hide TOC

# BitExtensionsBitRotL(UInt64, Int32) Method

Performs rightwise bit-rotation for the specified number of rotations.

## Definition

Namespace: Gemstone.BitExtensions
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.180 -- Release Build+914ca9e6d1cce46b614eb7013eba0303271cf6d8
C#
View Source Request Example

    public static ulong BitRotL(
    	this ulong value,
    	int rotations
    )

VB
View Source Request Example

    <ExtensionAttribute>
    Public Shared Function BitRotL (
    	value As ULong,
    	rotations As Integer
    ) As ULong

C++
View Source Request Example

    public:
    [ExtensionAttribute]
    static unsigned long long BitRotL(
    	unsigned long long value,
    	int rotations
    )

JavaScript
View Source Request Example

    Gemstone.BitExtensions.BitExtensions.BitRotL = function(value, rotations);

#### Parameters

value UInt64
  Value used for bit-rotation.
rotations Int32
  Number of rotations to perform.

#### Return Value

UInt64
Value that has its bits rotated to the right the specified number of times.

#### Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type UInt64. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

## Remarks

Actual rotation direction is from a big-endian perspective - this is an artifact of the native .NET bit shift operators. As a result bits may actually appear to rotate right on little-endian architectures.

## See Also

#### Reference

BitExtensions Class
BitRotL Overload
Gemstone.BitExtensions Namespace