Search Results for

    Show / Hide Table of Contents

    Class IPNetwork

    An IP network.

    Inheritance
    System.Object
    IPNetwork
    Namespace: FM.LiveSwitch
    Assembly: FM.LiveSwitch.dll
    Syntax
    public class IPNetwork : object

    Properties

    Address

    Gets the address.

    Declaration
    public string Address { get; }
    Property Value
    Type Description
    System.String

    Mask

    Gets the mask.

    Declaration
    public string Mask { get; }
    Property Value
    Type Description
    System.String

    PrefixLength

    Gets the prefix length.

    Declaration
    public int PrefixLength { get; }
    Property Value
    Type Description
    System.Int32

    Methods

    Matches(String)

    Checks if an address exists in this network.

    Declaration
    public bool Matches(string address)
    Parameters
    Type Name Description
    System.String address

    The address.

    Returns
    Type Description
    System.Boolean

    true if the address exists in this network; otherwise, false.

    Parse(String)

    Parses a CIDR.

    Declaration
    public static IPNetwork Parse(string cidr)
    Parameters
    Type Name Description
    System.String cidr

    The CIDR.

    Returns
    Type Description
    IPNetwork

    The IP network.

    ToString()

    Returns a string that represents this instance.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    A string that represents this instance.

    TryParse(String, out IPNetwork)

    Tries to parse a CIDR.

    Declaration
    public static bool TryParse(string cidr, out IPNetwork network)
    Parameters
    Type Name Description
    System.String cidr

    The CIDR.

    IPNetwork network

    The IP network.

    Returns
    Type Description
    System.Boolean

    true if successful; otherwise, false.

    In This Article
    Back to top Copyright © LiveSwitch Inc. All Rights Reserved. Doc build for LiveSwitch v1.15.0