Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​Net.​NetworkInformation.​IPAddressCollection

Assembly: System.Net.Primitives

Inheritance: object → IPAddressCollection

Stores a set of <see cref="T:System.Net.IPAddress" /> types.

Properties

public int
Count
Gets the number of <see cref="T:System.Net.IPAddress" /> types in this collection.
public bool
IsReadOnly
Gets a value that indicates whether access to this collection is read-only.
public IPAddress
Item

Methods

public void
Add​(IPAddress address)
address The object to be added to the collection.
Throws a <see cref="T:System.NotSupportedException" /> because this operation is not supported for this collection.
public void
Clear​()
Throws a <see cref="T:System.NotSupportedException" /> because this operation is not supported for this collection.
public bool
Contains​(IPAddress address)
address The <see cref="T:System.Net.IPAddress" /> object to be searched in the collection.
Returns <see langword="true" /> if the <see cref="T:System.Net.IPAddress" /> object exists in the collection; otherwise, <see langword="false" /> .
Checks whether the collection contains the specified <see cref="T:System.Net.IPAddress" /> object.
public void
CopyTo​(IPAddress[] array, int offset)
array A one-dimensional array that receives a copy of the collection.
offset The zero-based index in <paramref name="array" /> at which the copy begins.
Copies the elements in this collection to a one-dimensional array of type <see cref="T:System.Net.IPAddress" /> .
GetEnumerator​()
Returns An object that implements the <see cref="T:System.Collections.IEnumerator" /> interface and provides access to the <see cref="T:System.Net.NetworkInformation.IPAddressCollection" /> types in this collection.
Returns an object that can be used to iterate through this collection.
public bool
Remove​(IPAddress address)
address The object to be removed.
Returns Always throws a <see cref="T:System.NotSupportedException" /> .
Throws a <see cref="T:System.NotSupportedException" /> because this operation is not supported for this collection.
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
public Type
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object