Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

PeerName Constructor (String, PeerNameType)

Initializes a new instance of the PeerName class.

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

public PeerName(
	string classifier,
	PeerNameType peerNameType


Type: System.String

String that contains the Peer Name to encode as a PeerName.

Type: System.Net.PeerToPeer.PeerNameType

PeerNameType enumeration value that specifies the type of peer name to create.


The Classifier includes one or more illegal characters.


One or more parameters are null.

  • The Default Identity used as the basis of the PeerName could not be retrieved.

  • The PeerName could not be created.

This constructor returns an object of type PeerName that contains the fully qualified name of the peer. It also specifies whether the peer name is secured or unsecured.

This instance uses the default peer identity for the current user and the specified Classifier, in addition to the type of peer name to create with the specified classifier and type.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
© 2015 Microsoft