AddressHeaderCollection Constructors

Definition

Initializes a new instance of the AddressHeaderCollection class.

Overloads

AddressHeaderCollection()

Initializes a new instance of the AddressHeaderCollection class.

AddressHeaderCollection(IEnumerable<AddressHeader>)

Initializes a new instance of the AddressHeaderCollection class from an enumerable set of address headers.

AddressHeaderCollection()

Source:
AddressHeaderCollection.cs
Source:
AddressHeaderCollection.cs

Initializes a new instance of the AddressHeaderCollection class.

C#
public AddressHeaderCollection();

Examples

The following code snippet illustrates how to create an instance of AddressHeaderCollection class with the parameterless constructor.

Applies to

.NET 10 (package-provided) ja muut versiot
Tuote Versiot
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0

AddressHeaderCollection(IEnumerable<AddressHeader>)

Source:
AddressHeaderCollection.cs
Source:
AddressHeaderCollection.cs

Initializes a new instance of the AddressHeaderCollection class from an enumerable set of address headers.

C#
public AddressHeaderCollection(System.Collections.Generic.IEnumerable<System.ServiceModel.Channels.AddressHeader> addressHeaders);

Parameters

addressHeaders
IEnumerable<AddressHeader>

The IEnumerable<T> set of AddressHeader objects used to initialize the collection.

Exceptions

One of the address headers in the addressHeaders parameter is null.

Examples

The following code snippet illustrates how to create an instance of AddressHeaderCollection class.

Applies to

.NET 10 (package-provided) ja muut versiot
Tuote Versiot
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0