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.171 -- Release Build+4f4d518944b843c059d40b523747cd410a7c216d
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