Unosquare
    Show / Hide Table of Contents

    Class NetworkExtensions

    Provides various extension methods for networking-related tasks.

    Inheritance
    Object
    NetworkExtensions
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Swan
    Syntax
    public static class NetworkExtensions

    Methods

    IsPrivateAddress(IPAddress)

    Determines whether the IP address is private.

    Declaration
    public static bool IsPrivateAddress(this IPAddress this)
    Parameters
    Type Name Description
    IPAddress this

    The IP address.

    Returns
    Type Description
    Boolean

    True if the IP Address is private; otherwise, false.

    Exceptions
    Type Condition
    ArgumentNullException

    address.

    ToUInt32(IPAddress)

    Converts an IPv4 Address to its Unsigned, 32-bit integer representation.

    Declaration
    public static uint ToUInt32(this IPAddress this)
    Parameters
    Type Name Description
    IPAddress this

    The address.

    Returns
    Type Description
    UInt32

    A 32-bit unsigned integer converted from four bytes at a specified position in a byte array.

    Exceptions
    Type Condition
    ArgumentNullException

    address.

    ArgumentException

    InterNetwork - address.

    Comments

    Back to top Copyright © 2017-2019 Unosquare