File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ public sealed class SerialPort : IDisposable
6868 /// <param name="dataBits">The data bits value.</param>
6969 /// <param name="stopBits">One of the <see cref="StopBits"/> values.</param>
7070 /// <exception cref="IOException">The specified port could not be found or opened.</exception>
71- /// <exception cref="ArgumentException">The specified port could as aleready been opened.</exception>
71+ /// <exception cref="ArgumentException">The specified port is already opened.</exception>
7272 public SerialPort (
7373 string portName ,
7474 int baudRate = 9600 ,
@@ -97,7 +97,9 @@ public SerialPort(
9797 else
9898 {
9999 // this device already exists throw an exception
100+ #pragma warning disable S3928 // OK to throw this exception without details on the argument.
100101 throw new ArgumentException ( ) ;
102+ #pragma warning restore S3928 // Parameter names used into ArgumentException constructors should match an existing one
101103 }
102104 }
103105
@@ -106,6 +108,7 @@ public SerialPort(
106108 /// </summary>
107109 /// <exception cref="InvalidOperationException">The specified port on the current instance of the <see cref="SerialPort"/>.
108110 /// is already open.</exception>
111+ /// <exception cref="ArgumentException">One (or more) of the properties set to configure this <see cref="SerialPort"/> are invalid.</exception>
109112 public void Open ( )
110113 {
111114 if ( ! _opened )
You can’t perform that action at this time.
0 commit comments