System::Net::Http::Headers::HttpHeaderValueCollection< System::String > class

String > class

针对 String 类型的 HttpHeaderValueCollection 模板的部分特化。此类的对象应仅使用 System::MakeObject() 函数分配。切勿在栈上或使用 operator new 创建此类型的实例,因为这会导致运行时错误和/或断言故障。始终将此类包装到 System::SmartPtr 指针中,并使用该指针将其作为参数传递给函数。

class String > : public System::Collections::Generic::ICollection<System::String>,
                 public System::Collections::Generic::ICollection<System::String>

方法

方法描述
Add(const String&) override向集合中添加元素。
Clear() override删除集合中的所有元素。
Contains(const String&) const override检查集合中是否存在该元素。
CopyTo(System::ArrayPtr<String>, int32_t) override
get_Count() const override获取集合中的元素数量。
get_IsReadOnly()
get_IsSpecialValueSet()
GetEnumerator() override获取枚举器。
GetHeaderStringWithoutSpecial()
HttpHeaderValueCollection(String, System::SharedPtr<HttpHeaders>)
HttpHeaderValueCollection(String, System::SharedPtr<HttpHeaders>, Action<System::SharedPtr<HttpHeaderValueCollection<String>>, String>)
HttpHeaderValueCollection(String, System::SharedPtr<HttpHeaders>, String)
HttpHeaderValueCollection(String, System::SharedPtr<HttpHeaders>, String, Action<System::SharedPtr<HttpHeaderValueCollection<String>>, String>)
ParseAdd(String)
Remove(const String&) override从集合中删除元素。
RemoveSpecialValue()
SetSpecialValue()
SetTemplateWeakPtr(uint32_t) override将第 n 个模板参数设置为弱指针(而不是共享指针)。允许在容器中将指针切换为弱模式。
ToString() const override相当于 C# 的 Object.ToString() 方法。用于将自定义对象转换为字符串。
TryParseAdd(String)

另见