ServicePoint.ConnectionName 屬性

定義

取得連接名稱。

public:
 property System::String ^ ConnectionName { System::String ^ get(); };
public string ConnectionName { get; }
member this.ConnectionName : string
Public ReadOnly Property ConnectionName As String

屬性值

表示連接名稱的 String

範例

Console::WriteLine( "ConnectionName = {0}", sp->ConnectionName );

// Display the maximum number of connections allowed on this 
// ServicePoint instance.
Console::WriteLine( "ConnectionLimit = {0}", sp->ConnectionLimit );

// Display the number of connections associated with this 
// ServicePoint instance.
Console::WriteLine( "CurrentConnections = {0}", sp->CurrentConnections );
Console.WriteLine("ConnectionName = " + sp.ConnectionName);

// Display the maximum number of connections allowed on this
// ServicePoint instance.
Console.WriteLine("ConnectionLimit = " + sp.ConnectionLimit);

// Display the number of connections associated with this
// ServicePoint instance.
Console.WriteLine("CurrentConnections = " + sp.CurrentConnections);
Console.WriteLine(("ConnectionName = " + sp.ConnectionName))

' Display the maximum number of connections allowed on this 
' ServicePoint instance.
Console.WriteLine(("ConnectionLimit = " + sp.ConnectionLimit.ToString()))

' Display the number of connections associated with this 
' ServicePoint instance.
Console.WriteLine(("CurrentConnections = " + sp.CurrentConnections.ToString()))

備註

ServicePoint如果對象是藉由呼叫FindServicePoint具有Uri自變數的多載所建構,則 ConnectionName 屬性代表Scheme所使用的物件屬性Uri

ServicePoint如果對像是從網路主機和埠建構的,則 ConnectionName 屬性會包含代表主機和網路埠的字串。 ConnectionName如果從主機和埠建構時設定屬性,則只有WebRequest具有相同ConnectionGroupName值的物件可以使用這個ServicePoint物件。

適用於

另請參閱