SerialDevice.WriteTimeout Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the time-out value for a write operation.
public:
property TimeSpan WriteTimeout { TimeSpan get(); void set(TimeSpan value); };
TimeSpan WriteTimeout();
void WriteTimeout(TimeSpan value);
public System.TimeSpan WriteTimeout { get; set; }
var timeSpan = serialDevice.writeTimeout;
serialDevice.writeTimeout = timeSpan;
Public Property WriteTimeout As TimeSpan
Property Value
The span of time before a time-out occurs when a write operation doesn't finish.
- If WriteTimeout is 0, then write operations never time out.
- If WriteTimeout is greater than 0, then a write operation (to send the entire payload) times out if it exceeds WriteTimeout.
- The value of
TimeSpan.FromMilliseconds(ulong.MaxValue)
(see TimeSpan) has no special meaning for WriteTimeout.
Note
The Windows Runtime APIs for serial devices thinly wrap the functionality of the corresponding Win32 APIs. So the meaning of the WriteTotalTimeoutConstant member of the Win32 SERIAL_TIMEOUTS structure applies to SerialDevice.WriteTimeout. For specifics, see the SERIAL_TIMEOUTS structure, and Setting read and write timeouts for a serial device.