共用方式為


BindingCollectionElement.TryAdd(String, Binding, Configuration) 方法

定義

將指定的繫結新增至集合中。

protected public:
 abstract bool TryAdd(System::String ^ name, System::ServiceModel::Channels::Binding ^ binding, System::Configuration::Configuration ^ config);
protected internal abstract bool TryAdd (string name, System.ServiceModel.Channels.Binding binding, System.Configuration.Configuration config);
abstract member TryAdd : string * System.ServiceModel.Channels.Binding * System.Configuration.Configuration -> bool
Protected Friend MustOverride Function TryAdd (name As String, binding As Binding, config As Configuration) As Boolean

參數

name
String

要加入之繫結的名稱。

binding
Binding

表示要加入之繫結的 Binding 物件。

config
Configuration

這個繫結的組態設定。

傳回

如果作業順利完成,則為 true,否則為 false

適用於