WebHeaderCollection 构造函数

定义

初始化 WebHeaderCollection 类的新实例。

重载

WebHeaderCollection()

初始化 WebHeaderCollection 类的新实例。

WebHeaderCollection(SerializationInfo, StreamingContext)
已过时.

WebHeaderCollectionSerializationInfo 类的指定实例初始化 StreamingContext 类的新实例。

WebHeaderCollection()

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

注意

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

WebHeaderCollectionSerializationInfo 类的指定实例初始化 StreamingContext 类的新实例。

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}")]
protected WebHeaderCollection (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
new System.Net.WebHeaderCollection : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.WebHeaderCollection
[<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
Protected Sub New (serializationInfo As SerializationInfo, streamingContext As StreamingContext)

参数

serializationInfo
SerializationInfo

一个 SerializationInfo,其中包含序列化 WebHeaderCollection 所需的信息。

streamingContext
StreamingContext

一个 StreamingContext,其中包含与新 WebHeaderCollection 关联的序列化流的源。

属性

例外

headerName 包含无效字符。

headerName 是空引用或为 Empty

注解

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

另请参阅

适用于