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.173 -- Release Build+298e1c238b074757f82f41812034645402a162ed
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