This documentation is archived and is not being maintained.

ContactManager::GetContacts Method

Returns a PeerContactCollection that contains all contacts within the ContactManager of the remote peer.

Namespace:  System.Net.PeerToPeer.Collaboration
Assembly:  System.Net (in System.Net.dll)

public:
PeerContactCollection^ GetContacts()

Return Value

Type: System.Net.PeerToPeer.Collaboration::PeerContactCollection
PeerContactCollection that contains all contacts within the ContactManager of the remote peer.
If the contact manager is empty, then a collection of size zero (0) is returned.

ExceptionCondition
ObjectDisposedException

This ContactManager object has been disposed.

PeerToPeerException

An invalid value was returned when this method attempted to enumerate a Peer in this peer contact collection.

Calling this method requires a PermissionState of Unrestricted.

The following code example illustrates how to retrieve a PeerContactCollection representing the contacts contained in the local ContactManager:

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: