Class NetworkExtensions
Provides various extension methods for networking-related tasks.
Inherited Members
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. |