Gemstone Common Library
Show/Hide TOC

# LittleEndianToBoolean(Byte, Int32) Method

Returns a Boolean value converted from one byte at a specified position in a byte array.

## Definition

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

    public static bool ToBoolean(
    	byte[] buffer,
    	int startIndex
    )

VB
View Source Request Example

    Public Shared Function ToBoolean (
    	buffer As Byte(),
    	startIndex As Integer
    ) As Boolean

C++
View Source Request Example

    public:
    static bool ToBoolean(
    	array<unsigned char>^ buffer,
    	int startIndex
    )

JavaScript
View Source Request Example

    Gemstone.LittleEndian.ToBoolean = function(buffer, startIndex);

#### Parameters

buffer Byte
  An array of bytes.
startIndex Int32
  The starting position within value.

#### Return Value

Boolean
true if the byte at startIndex in value is nonzero; otherwise, false.

## Exceptions

ArgumentNullException | value is null.
ArgumentOutOfRangeException | startIndex is less than zero or greater than the length of value minus 1.

## See Also

#### Reference

LittleEndian Class
ToBoolean Overload
Gemstone Namespace