Windows Dev Center

The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

AmbiguousMatchException Class

The exception that is thrown when binding to a method results in more than one method matching the binding criteria. This class cannot be inherited.

For a list of all members of this type, see AmbiguousMatchException Members.


[Visual Basic]
NotInheritable Public Class AmbiguousMatchException
   Inherits SystemException
public sealed class AmbiguousMatchException : SystemException
public __gc __sealed class AmbiguousMatchException : public
class AmbiguousMatchException extends SystemException

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


AmbiguousMatchException uses the HRESULT COR_E_AMBIGUOUSMATCH which has the value 0x8000211D.

An AmbiguousMatchException is thrown if the application calls upon a class and it cannot determine which class or overloaded class to utilize. The binding attempts to locate the proper class to use, determined by the number of parameters and the type of parameters. If multiple acceptable classes are located, AmbiguousMatchException is thrown.

Overload resolution is a mechanism for selecting the best function member to invoke given an argument list and a set of candidate function members. Overload resolution selects the function member to invoke. If a selection cannot be determined, an AmbiguousMatchException is thrown.


Namespace: System.Reflection

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

Assembly: Mscorlib (in Mscorlib.dll)

See Also

AmbiguousMatchException Members | System.Reflection Namespace | Exception | SystemException | Handling and Throwing Exceptions

© 2015 Microsoft