一款简单易用的基础网络通讯组件库。

HttpValuesExtensionContains(IHttpValues, String, TextValues, Boolean) 方法

确定集合是否包含指定的键及其关联的值。

Definition

命名空间: TouchSocket.Http
程序集: TouchSocket.Http (在 TouchSocket.Http.dll 中) 版本:4.1.4.7+7f7e1f78093c99347956e09330d5d7aca1d2bdf2
C#
public static bool Contains(
	this IHttpValues httpValues,
	string key,
	TextValues value,
	bool ignoreCase
)

参数

httpValues  IHttpValues
HTTP值集合
key  String
要在集合中查找的键。不能为空。
value  TextValues
要查找的、与指定键相关联的值。
ignoreCase  Boolean
是否忽略大小写

返回值

Boolean
若集合中存在包含指定键和对应值的元素,则返回;否则返回

备注

在 Visual Basic 和 C# 中,这个方法可以当成为类型 IHttpValues 的实例方法来调用。在采用实例方法语法调用这个方法时,请省略第一个参数。请参考 扩展方法 (Visual Basic)扩展方法 (C# 编程指南) 获取更多信息。

参见