Click or drag to resize

StringConversionSafeASCIIGetString Method

Replacement for System.Text.Encoding.ASCII.GetString that terminates the string if it finds nul or control characters.

Namespace:  Demo3D.PLC
Assembly:  PLC (in PLC.dll) Version: 15.0.2.11458
Syntax
C#
public static string SafeASCIIGetString(
	byte[] bytes,
	int index,
	int numBytes
)

Parameters

bytes
Type: SystemByte
The byte array containing the sequence of bytes to decode.
index
Type: SystemInt32
The index of the first byte to decode.
numBytes
Type: SystemInt32
The number of bytes to decode.

Return Value

Type: String
A string that contains the results of decoding the specified sequence of bytes.
See Also