Searches for the interface with the specified name.
- name
- A string containing the name of the interface to get.
A Type object representing the interface with the specified name, implemented or inherited by the current Type, if found; otherwise, null.
Type Reason ArgumentNullException name is null. System.Reflection.AmbiguousMatchException The current instance represents a type that implements the same generic interface with different type arguments.
The search for name is case-sensitive.
If the current instance represents a generic type, this method returns the Type with the type parameters replaced by the appropriate type arguments.
If the current instance represents an unassigned type parameter of a generic type or method, this method searches the interface constraints and any interfaces inherited from class or interface constraints.
Note: The name parameter cannot include type arguments.Note: Even with the introduction of generics, this method continues to return only non-generic members. To get the generic ones, one must call Type.GetInterfaces, and filter them out.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0