Click or drag to resize

NetworkCidr Class

Describes a IP network subnet using Classless Inter-Domain Routing (CIDR) notation.
Inheritance Hierarchy

Namespace:  Neon.Net
Assembly:  Neon.Common (in Neon.Common.dll) Version: 2.10.0
public class NetworkCidr

The NetworkCidr type exposes the following members.

Public methodNetworkCidr
Creates a subnet from an IP address and prefix length.
Public propertyAddress
Returns the CIDR address.
Public propertyAddressCount
Returns the number of IP addresses within the subnet.
Public propertyStatic memberAll
Returns the subnet which includes all public and private IP addresses.
Public propertyFirstAddress
Returns the first IP address in the subnet.
Public propertyFirstUsableAddress
Returns the first usable IP address in the subnet.
Public propertyLastAddress
Returns the last IP address in the subnet.
Public propertyMask
Returns the subnet mask.
Public propertyNextAddress
Returns the first address after the subnet.
Public propertyPrefixLength
Returns the prefix length in bits.
Public methodContains(IPAddress)
Determines whether an IP address is within the subnet.
Public methodContains(NetworkCidr)
Determines whether a subnet is completely contained within the current subnet.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Overrides ObjectEquals(Object).)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Overrides ObjectGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStatic memberNormalize
Attempts to normalize a network CIDR string by ensuring that the address actually fits the mask.
Public methodOverlaps
Determines whether this subnet overlaps another.
Public methodStatic memberParse
Parses a subnet from CIDR notation in the form of ip-address/prefix, where prefix is the network prefix length in bits.
Public methodToString
Returns a string that represents the current object.
(Overrides ObjectToString.)
Public methodStatic memberTryParse
Attempts to parse a subnet from CIDR notation in the form of ip-address/prefix, where prefix is the network prefix length in bits.
Public operatorStatic memberEquality
Compares two NetworkCidr instances for equality.
Public operatorStatic member(NetworkCidr to String)
Implicitly casts a NetworkCidr into a string.
Public operatorStatic memberInequality
Compares two NetworkCidr instances for inequality.

This is generally used for describing an IP subnet. See the following Wikipedia article for more information.

Note Note
This class currently supports only IPv4 addresses.
See Also