IpPrefix(InetAddress, Int32) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Constructs a new IpPrefix
from an IPv4 or IPv6 address and a prefix length.
[Android.Runtime.Register(".ctor", "(Ljava/net/InetAddress;I)V", "", ApiSince=33)]
public IpPrefix (Java.Net.InetAddress address, int prefixLength);
[<Android.Runtime.Register(".ctor", "(Ljava/net/InetAddress;I)V", "", ApiSince=33)>]
new Android.Net.IpPrefix : Java.Net.InetAddress * int -> Android.Net.IpPrefix
Parameters
- address
- InetAddress
the IP address. Must be non-null.
- prefixLength
- Int32
the prefix length. Must be >= 0 and <= (32 or 128) (IPv4 or IPv6).
- Attributes
Remarks
Constructs a new IpPrefix
from an IPv4 or IPv6 address and a prefix length. Silently truncates the address to the prefix length, so for example 192.0.2.1/24
is silently converted to 192.0.2.0/24
.
Java documentation for android.net.IpPrefix.IpPrefix(java.net.InetAddress, int)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.