Share via


AddressHeaderCollection 构造函数

定义

初始化 AddressHeaderCollection 类的新实例。

重载

AddressHeaderCollection()

初始化 AddressHeaderCollection 类的新实例。

AddressHeaderCollection(IEnumerable<AddressHeader>)

从地址标头的可枚举集创建 AddressHeaderCollection 类的新实例。

AddressHeaderCollection()

Source:
AddressHeaderCollection.cs
Source:
AddressHeaderCollection.cs
Source:
AddressHeaderCollection.cs

初始化 AddressHeaderCollection 类的新实例。

public:
 AddressHeaderCollection();
public AddressHeaderCollection ();
Public Sub New ()

示例

以下代码片段演示如何使用无参数构造函数创建 类的 AddressHeaderCollection 实例。

适用于

AddressHeaderCollection(IEnumerable<AddressHeader>)

Source:
AddressHeaderCollection.cs
Source:
AddressHeaderCollection.cs
Source:
AddressHeaderCollection.cs

从地址标头的可枚举集创建 AddressHeaderCollection 类的新实例。

public:
 AddressHeaderCollection(System::Collections::Generic::IEnumerable<System::ServiceModel::Channels::AddressHeader ^> ^ addressHeaders);
public AddressHeaderCollection (System.Collections.Generic.IEnumerable<System.ServiceModel.Channels.AddressHeader> addressHeaders);
new System.ServiceModel.Channels.AddressHeaderCollection : seq<System.ServiceModel.Channels.AddressHeader> -> System.ServiceModel.Channels.AddressHeaderCollection
Public Sub New (addressHeaders As IEnumerable(Of AddressHeader))

参数

addressHeaders
IEnumerable<AddressHeader>

用于初始化集合的 IEnumerable<T> 对象的 AddressHeader 集。

例外

addressHeaders 参数中的一个地址标头为 null

示例

下面的代码段演示如何创建 AddressHeaderCollection 类的实例。

适用于