@@ -54,7 +54,7 @@ private static bool InternalParse(bool tryParse, string ipaddress, string netmas
5454 {
5555 if ( ! tryParse )
5656 {
57- throw new ArgumentException ( " ipaddress" ) ;
57+ throw new ArgumentException ( nameof ( ipaddress ) ) ;
5858 }
5959
6060 ipnetwork = null ;
@@ -66,7 +66,7 @@ private static bool InternalParse(bool tryParse, string ipaddress, string netmas
6666 {
6767 if ( ! tryParse )
6868 {
69- throw new ArgumentException ( " netmask" ) ;
69+ throw new ArgumentException ( nameof ( netmask ) ) ;
7070 }
7171
7272 ipnetwork = null ;
@@ -122,7 +122,7 @@ private static bool InternalParse(bool tryParse, string network, ICidrGuess cidr
122122
123123 if ( ! tryParse )
124124 {
125- throw new ArgumentException ( " network" ) ;
125+ throw new ArgumentException ( nameof ( network ) ) ;
126126 }
127127
128128 ipnetwork = null ;
@@ -194,7 +194,7 @@ private static bool InternalParse(bool tryParse, IPAddress ipaddress, IPAddress
194194 {
195195 if ( ! tryParse )
196196 {
197- throw new ArgumentException ( " netmask" ) ;
197+ throw new ArgumentException ( nameof ( netmask ) ) ;
198198 }
199199
200200 ipnetwork = null ;
@@ -238,7 +238,7 @@ private static bool InternalParse(bool tryParse, string ipaddress, byte cidr, ou
238238 {
239239 if ( ! tryParse )
240240 {
241- throw new ArgumentException ( " ipaddress" ) ;
241+ throw new ArgumentException ( nameof ( ipaddress ) ) ;
242242 }
243243
244244 ipnetwork = null ;
@@ -250,7 +250,7 @@ private static bool InternalParse(bool tryParse, string ipaddress, byte cidr, ou
250250 {
251251 if ( ! tryParse )
252252 {
253- throw new ArgumentException ( " cidr" ) ;
253+ throw new ArgumentException ( nameof ( cidr ) ) ;
254254 }
255255
256256 ipnetwork = null ;
0 commit comments