Container.HasService<T>(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Determines whether the specified container has the named service.
public:
generic <typename T>
where T : class virtual bool HasService(System::String ^ name);
public bool HasService<T> (string name) where T : class;
abstract member HasService : string -> bool (requires 'T : null)
override this.HasService : string -> bool (requires 'T : null)
Public Function HasService(Of T As Class) (name As String) As Boolean
Type Parameters
- T
The type of the service to search for.
Parameters
- name
- String
The name of the service to search for.
Returns
Returns Boolean.
true
if the specified container has the named service; otherwise, false
.
Implements
Exceptions
The name
parameter is a null reference (Nothing in Visual Basic) or empty.