WebHeaderCollection 构造函数

定义

初始化 WebHeaderCollection 类的新实例。

重载

名称 说明
WebHeaderCollection()

初始化 WebHeaderCollection 类的新实例。

WebHeaderCollection(SerializationInfo, StreamingContext)
已过时.

从类的WebHeaderCollection指定实例初始化类的新实例SerializationInfoStreamingContext

WebHeaderCollection()

Source:
WebHeaderCollection.cs
Source:
WebHeaderCollection.cs
Source:
WebHeaderCollection.cs
Source:
WebHeaderCollection.cs
Source:
WebHeaderCollection.cs

初始化 WebHeaderCollection 类的新实例。

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

适用于

WebHeaderCollection(SerializationInfo, StreamingContext)

Source:
WebHeaderCollection.cs
Source:
WebHeaderCollection.cs
Source:
WebHeaderCollection.cs
Source:
WebHeaderCollection.cs
Source:
WebHeaderCollection.cs

注意

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

从类的WebHeaderCollection指定实例初始化类的新实例SerializationInfoStreamingContext

protected:
 WebHeaderCollection(System::Runtime::Serialization::SerializationInfo ^ serializationInfo, System::Runtime::Serialization::StreamingContext streamingContext);
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected WebHeaderCollection(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
protected WebHeaderCollection(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Net.WebHeaderCollection : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.WebHeaderCollection
new System.Net.WebHeaderCollection : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.WebHeaderCollection
Protected Sub New (serializationInfo As SerializationInfo, streamingContext As StreamingContext)

参数

serializationInfo
SerializationInfo

一个包含序列化 <a0/&a0> 所需的信息。

streamingContext
StreamingContext

StreamingContext包含与新WebHeaderCollection流关联的序列化流的源。

属性

例外

标头名称包含无效字符。

标头名称为 null 引用或 Empty

注解

此构造函数实现 ISerializable 类的 WebHeaderCollection 接口。

另请参阅

适用于