BitConverter: ToBoolean

ToBoolean

Converts an array of bytes to a Boolean value.



 Public Function ToBoolean(
	  ByRef Value ( ) As Byte,
	  ByVal StartIndex As Long ) As Boolean

Parameters

Value
[ByRef] Byte. The array of bytes to create a boolean from.
StartIndex
[ByVal] Long. The byte in the array to create the boolean from.

Return Values

Boolean -  Boolean representation of the byte used in the array.

Remarks

The boolean value is created from one byte. If the byte is a non-zero value, True is returned, otherwise, False is returned.

Exceptions

ExceptionCondition
ArgumentNullExceptionValue is uninitialized.
ArgumentOutOfRangeExceptionStartIndex is less than zero or greater than the length of Value minus 1.

See Also

Project CorLib Overview

Class BitConverter Overview