NetTcpBinding.CreateBindingElements 方法

定义

为绑定创建一个绑定元素集合。Creates a collection with the binding elements for the binding.

public:
 override System::ServiceModel::Channels::BindingElementCollection ^ CreateBindingElements();
public override System.ServiceModel.Channels.BindingElementCollection CreateBindingElements ();
override this.CreateBindingElements : unit -> System.ServiceModel.Channels.BindingElementCollection
Public Overrides Function CreateBindingElements () As BindingElementCollection

返回

组成绑定的 ICollection<T> 类型的 BindingElementThe ICollection<T> of type BindingElement that makes up the binding.

示例

此示例演示如何使用 CreateBindingElements 方法创建包含绑定的绑定元素的集合。This example shows how to use the CreateBindingElements method to create a collection with the binding elements for the binding.

BindingElementCollection elementCollection =
binding.CreateBindingElements();

适用于