You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: System.IO.Ports/SerialPort.cs
+4-5Lines changed: 4 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -383,14 +383,14 @@ public string NewLine
383
383
/// <exception cref="IOException">The port is in an invalid state. -or- An attempt to set the state of the underlying
384
384
/// port failed. For example, the parameters passed from this <see cref="SerialPort"/>
385
385
/// object were invalid.</exception>
386
-
/// <exception cref="ArgumentOutOfRangeException">The read time-out value is less than zero and not equal to <see cref="Timeout"/>.</exception>
386
+
/// <exception cref="ArgumentOutOfRangeException">The read time-out value is less than zero and not equal to <see cref="Timeout.Infinite"/>.</exception>
387
387
publicintReadTimeout
388
388
{
389
389
get=>_readTimeout;
390
390
391
391
set
392
392
{
393
-
if(value<=0)
393
+
if(value<0&&value!=Timeout.Infinite)
394
394
{
395
395
thrownewArgumentOutOfRangeException();
396
396
}
@@ -406,15 +406,14 @@ public int ReadTimeout
406
406
/// <exception cref="IOException">The port is in an invalid state. -or- An attempt to set the state of the underlying
407
407
/// port failed. For example, the parameters passed from this <see cref="SerialPort"/>
408
408
/// object were invalid.</exception>
409
-
/// <exception cref="ArgumentOutOfRangeException">The <see cref="WriteTimeout"/> value is less than zero and not equal
410
-
/// to <see cref="Timeout"/>.</exception>
409
+
/// <exception cref="ArgumentOutOfRangeException">The read time-out value is less than zero and not equal to <see cref="Timeout.Infinite"/>.</exception>
0 commit comments