Gemstone Common Library
Show/Hide TOC

# LittleEndianToChar(Byte, Int32) Method

Returns a Unicode character converted from two bytes, accounting for target endian-order, at a specified position in a byte array.

## Definition

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

    public static char ToChar(
    	byte[] buffer,
    	int startIndex
    )

VB
View Source Request Example

    Public Shared Function ToChar (
    	buffer As Byte(),
    	startIndex As Integer
    ) As Char

C++
View Source Request Example

    public:
    static wchar_t ToChar(
    	array<unsigned char>^ buffer,
    	int startIndex
    )

JavaScript
View Source Request Example

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

#### Parameters

buffer Byte
  An array of bytes (i.e., buffer containing binary image of value).
startIndex Int32
  The starting position within value.

#### Return Value

Char
A character formed by two bytes beginning at startIndex.

## 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
ToChar Overload
Gemstone Namespace