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
Implemented Interfaces
- Collections.​Generic.​ICollection`1 (Inherits: IEnumerable<​Net.​IPAddress>IEnumerable)
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)
Throws a <see cref="T:System.NotSupportedException" /> because this operation is not supported for this collection.
address
The object to be added to the 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)
Checks whether the collection contains the specified <see cref="T:System.Net.IPAddress" /> object.
Returns <see langword="true" /> if the <see cref="T:System.Net.IPAddress" /> object exists in the collection; otherwise, <see langword="false" /> .
address
The <see cref="T:System.Net.IPAddress" /> object to be searched in the collection.
public
void
CopyTo​(IPAddress[] array,
int offset)
Copies the elements in this collection to a one-dimensional array of type <see cref="T:System.Net.IPAddress" /> .
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.
public
Collections.​Generic.​IEnumerator<​IPAddress>
GetEnumerator​()
Returns an object that can be used to iterate through this collection.
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.
public
bool
Remove​(IPAddress address)
Throws a <see cref="T:System.NotSupportedException" /> because this operation is not supported for this collection.
Returns Always throws a <see cref="T:System.NotSupportedException" /> .
address
The object to be removed.
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object