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: src/System.Net.IPNetwork/IPNetwork2.cs
+49Lines changed: 49 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -540,6 +540,55 @@ public static bool TryParse(IPAddress ipaddress, IPAddress netmask, out IPNetwor
540
540
returnparsed;
541
541
}
542
542
543
+
/// <summary>
544
+
/// 192.168.0.1/24
545
+
/// 192.168.0.1 255.255.255.0
546
+
///
547
+
/// Network : 192.168.0.0
548
+
/// Netmask : 255.255.255.0
549
+
/// Cidr : 24
550
+
/// Start : 192.168.0.1
551
+
/// End : 192.168.0.254
552
+
/// Broadcast : 192.168.0.255.
553
+
/// </summary>
554
+
/// <param name="network">A string containing an ip network to convert.</param>
555
+
/// <param name="cidrGuess">A ICidrGuess implementation that will be used to guess CIDR during converion.</param>
556
+
/// <param name="ipnetwork">When this method returns, contains the IPNetwork value equivalent of the ip adress contained in ipaddress with the netmask corresponding to cidr, if the conversion succeeded, or null if the conversion failed. The conversion fails if the s parameter is null or Empty, is not of the correct format, or represents an invalid ip address. This parameter is passed uninitialized; any value originally supplied in result will be overwritten.</param>
557
+
/// <returns>true if network was converted successfully; otherwise, false..</returns>
/// <param name="network">A string containing an ip network to convert.</param>
579
+
/// <param name="cidrGuess">A ICidrGuess implementation that will be used to guess CIDR during converion.</param>
580
+
/// <param name="sanitanize">Whether to sanitize network or not.</param>
581
+
/// <param name="ipnetwork">When this method returns, contains the IPNetwork value equivalent of the ip adress contained in ipaddress with the netmask corresponding to cidr, if the conversion succeeded, or null if the conversion failed. The conversion fails if the s parameter is null or Empty, is not of the correct format, or represents an invalid ip address. This parameter is passed uninitialized; any value originally supplied in result will be overwritten.</param>
582
+
/// <returns>true if network was converted successfully; otherwise, false..</returns>
0 commit comments