共用方式為


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>中找到 itemtrue;否則,false

實作

適用於