This documentation is archived and is not being maintained.
ContactManager::GetContacts Method
Visual Studio 2010
Returns a PeerContactCollection that contains all contacts within the ContactManager of the remote peer.
Assembly: System.Net (in System.Net.dll)
Return Value
Type: System.Net.PeerToPeer.Collaboration::PeerContactCollectionPeerContactCollection 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.
| Exception | Condition |
|---|---|
| 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:
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: