ServiceCollection.Contains(ServiceDescriptor) 方法

定义

确定 ICollection<T> 是否包含特定值。

public:
 virtual bool Contains(Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ item);
public bool Contains (Microsoft.Extensions.DependencyInjection.ServiceDescriptor item);
abstract member Contains : Microsoft.Extensions.DependencyInjection.ServiceDescriptor -> bool
override this.Contains : Microsoft.Extensions.DependencyInjection.ServiceDescriptor -> bool
Public Function Contains (item As ServiceDescriptor) As Boolean

参数

item
ServiceDescriptor

ICollection<T>中查找的对象。

返回

如果在 ICollection<T>中找到 item,则为 true;否则,false

实现

适用于