![]() | NetworkCidr Class |
Namespace: Neon.Net
The NetworkCidr type exposes the following members.
Name | Description | |
---|---|---|
![]() | NetworkCidr(IPAddress, Int32) |
Constructs a subnet from an IPv4 address and prefix length.
|
![]() | NetworkCidr(IPAddress, IPAddress) |
Constructs a subnet from an IPv4 address and subnet mask.
|
Name | Description | |
---|---|---|
![]() | Address |
Returns the CIDR address.
|
![]() | AddressCount |
Returns the number of IP addresses within the subnet.
|
![]() ![]() | All |
Returns the 0.0.0.0/0 subnet which includes all public and private
IP addresses.
|
![]() | FirstAddress |
Returns the first IP address in the subnet.
|
![]() | FirstUsableAddress |
Returns the first usable IP address in the subnet.
|
![]() | LastAddress |
Returns the last IP address in the subnet.
|
![]() | Mask |
Returns the subnet mask.
|
![]() | NextAddress |
Returns the first address after the subnet.
|
![]() | PrefixLength |
Returns the prefix length in bits.
|
Name | Description | |
---|---|---|
![]() | Contains(IPAddress) |
Determines whether an IP address is within the subnet.
|
![]() | Contains(NetworkCidr) |
Determines whether a subnet is completely contained within the current subnet.
|
![]() | Equals | Determines whether the specified object is equal to the current object. (Overrides ObjectEquals(Object).) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as the default hash function. (Overrides ObjectGetHashCode.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() ![]() | Normalize |
Attempts to normalize a network CIDR string by ensuring that the
address actually fits the mask.
|
![]() | Overlaps |
Determines whether this subnet overlaps another.
|
![]() ![]() | Parse |
Parses a subnet from CIDR notation in the form of ip-address/prefix,
where prefix is the network prefix length in bits.
|
![]() | ToString | Returns a string that represents the current object. (Overrides ObjectToString.) |
![]() ![]() | TryParse |
Attempts to parse a subnet from CIDR notation in the form of ip-address/prefix,
where prefix is the network prefix length in bits.
|
Name | Description | |
---|---|---|
![]() ![]() | Equality |
Compares two NetworkCidr instances for equality.
|
![]() ![]() | (NetworkCidr to String) |
Implicitly casts a NetworkCidr into a string.
|
![]() ![]() | Inequality |
Compares two NetworkCidr instances for inequality.
|
This is generally used for describing an IP subnet. See the following Wikipedia article for more information.
https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation
![]() |
---|
This class currently supports only IPv4 addresses. |