NameValueHeaderValue 类

定义

表示用于各种标头的在 RFC 2616 中定义的名称/值对。Represents a name/value pair used in various headers as defined in RFC 2616.

public ref class NameValueHeaderValue : ICloneable
public class NameValueHeaderValue : ICloneable
type NameValueHeaderValue = class
    interface ICloneable
Public Class NameValueHeaderValue
Implements ICloneable
继承
NameValueHeaderValue
派生
实现

注解

NameValueHeaderValue 类提供对在由 IETF 在RFC 2616中定义的各种标头中使用的名称/值对的支持。The NameValueHeaderValue class provides support for name/value pairs used in various headers as defined in RFC 2616 by the IETF.

构造函数

NameValueHeaderValue(NameValueHeaderValue)

初始化 NameValueHeaderValue 类的新实例。Initializes a new instance of the NameValueHeaderValue class.

NameValueHeaderValue(String)

初始化 NameValueHeaderValue 类的新实例。Initializes a new instance of the NameValueHeaderValue class.

NameValueHeaderValue(String, String)

初始化 NameValueHeaderValue 类的新实例。Initializes a new instance of the NameValueHeaderValue class.

属性

Name

获取标头名称。Gets the header name.

Value

获取标头值。Gets the header value.

方法

Equals(Object)

确定指定的 Object 是否等于当前的 NameValueHeaderValue 对象。Determines whether the specified Object is equal to the current NameValueHeaderValue object.

GetHashCode()

充当 NameValueHeaderValue 对象的哈希函数。Serves as a hash function for an NameValueHeaderValue object.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
Parse(String)

将字符串转换为 NameValueHeaderValue 实例。Converts a string to an NameValueHeaderValue instance.

ToString()

返回表示当前 NameValueHeaderValue 对象的字符串。Returns a string that represents the current NameValueHeaderValue object.

TryParse(String, NameValueHeaderValue)

确定一个字符串是否为有效的 NameValueHeaderValue 信息。Determines whether a string is valid NameValueHeaderValue information.

显式接口实现

ICloneable.Clone()

创建作为当前 NameValueHeaderValue 实例副本的新对象。Creates a new object that is a copy of the current NameValueHeaderValue instance.

适用于