Contains protocol headers associated with a request or response.
For a list of all members of this type, see WebHeaderCollection Members.
System.Object
System.Collections.Specialized.NameObjectCollectionBase
System.Collections.Specialized.NameValueCollection
System.Net.WebHeaderCollection
[Visual Basic] <Serializable> <ComVisible(True)> Public Class WebHeaderCollection Inherits NameValueCollection [C#] [Serializable] [ComVisible(true)] public class WebHeaderCollection : NameValueCollection [C++] [Serializable] [ComVisible(true)] public __gc class WebHeaderCollection : public NameValueCollection [JScript] public Serializable ComVisible(true) class WebHeaderCollection extends NameValueCollection
Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.
The WebHeaderCollection class is generally accessed through WebRequest.Headers or WebResponse.Headers. Some common headers are considered restricted and are either exposed directly by the API (such as Content-Type) or protected by the system and cannot be changed.
The restricted headers are:
Namespace: System.Net
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework - Windows CE .NET
Assembly: System (in System.dll)