Represents an exception that is thrown when a method or constructor cannot be matched.
Object
Exception
SystemException
AmbiguousMatchException
[Visual Basic] NotInheritable Public Class AmbiguousMatchException Inherits SystemException [C#] public sealed class AmbiguousMatchException : SystemException [C++] public __gc __sealed class AmbiguousMatchException : public SystemException [JScript] public class AmbiguousMatchException extends SystemException
The AmbiguousMatchException is thrown when the binding to a method results in more than one method matching the binding criteria. In general, this exception is thrown when something is ambiguous.
An AmbiguousMatchException is thrown is the application calls upon a class and it cannot determine which class or overloaded class to utilize. The binding will attempt to locate the proper class to use, determined by the number of parameters and the type of parameters. If no acceptable class can be determined, the exception 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
Assembly: mscorlib.dll
AmbiguousMatchException Members | System.Reflection Namespace | Exception | SystemException