Click or drag to resize

SerialPortReadStringUpToEndChars(CollectionString, String, Int32) Method

Reads the serial port up to the first occurrence of one of the endChars sequences of the endCharsList collection. It works only if AutoReceive property is false.

Namespace: ZylSoft.Serial
Assembly: ZylSerialPort (in ZylSerialPort.dll) Version: 1.83.8519.34486
Syntax
public string ReadStringUpToEndChars(
	Collection<string> endCharsList,
	out string partialResult,
	int timeout = 60000
)

Parameters

endCharsList  CollectionString
Collection of terminator characters sequence.
partialResult  String
partialResult is empty string, if endChars sequence was found, otherwise contains the discarded data.
timeout  Int32  (Optional)
If the timeout (milliseconds) interval elapses and no endChars are found, the method will return with empty string (anti-blocking protection). Default value: 60000.

Return Value

String
Returns the contents of the input buffer up to the first occurrence of a endChars sequence, but endChars are not included in the result.
See Also