473,326 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Ambiguous match found.

Ben
Hi

I have just created a new ASP .net web project and when i run the project I
receieve this error:

System.Reflection.AmbiguousMatchException: Ambiguous match found.

Any help would be much appreciated

Thanks
B
Nov 19 '05 #1
3 2721
Hi Ben,

Suppose you have 2 namespaces, foo and bar.

Each namespace has a class with the same name: foo.ClassA and bar.ClassA

You've imported the namespaces for your convenience, so you don't have to
use the namespace when you type your code:

Imports foo
Imports bar

Now, you type the following code:

Public Snafu AS ClassA = new ClassA()

Which class is instantiated? foo.ClassA or bar.ClassA?

The name "ClassA" is ambiguous because without the namespace, the compiler
can't tell which class in which namespace you mean.

Ambiguity has a certain quality to it.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Ben" <Be*@NoSpam.com> wrote in message
news:un**************@TK2MSFTNGP14.phx.gbl...
Hi

I have just created a new ASP .net web project and when i run the project
I receieve this error:

System.Reflection.AmbiguousMatchException: Ambiguous match found.

Any help would be much appreciated

Thanks
B

Nov 19 '05 #2
Ben, there are a few hits out there if you google on "asp.net ambiguous match".

"Ben" wrote:
Hi

I have just created a new ASP .net web project and when i run the project I
receieve this error:

System.Reflection.AmbiguousMatchException: Ambiguous match found.

Any help would be much appreciated

Thanks
B

Nov 19 '05 #3
Ben
Thanks Kevin

My own fault for not checking the Web Form Designer Generated Code.

Many thanks

B

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:Oa**************@TK2MSFTNGP12.phx.gbl...
Hi Ben,

Suppose you have 2 namespaces, foo and bar.

Each namespace has a class with the same name: foo.ClassA and bar.ClassA

You've imported the namespaces for your convenience, so you don't have to
use the namespace when you type your code:

Imports foo
Imports bar

Now, you type the following code:

Public Snafu AS ClassA = new ClassA()

Which class is instantiated? foo.ClassA or bar.ClassA?

The name "ClassA" is ambiguous because without the namespace, the compiler
can't tell which class in which namespace you mean.

Ambiguity has a certain quality to it.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
What You Seek Is What You Get.

"Ben" <Be*@NoSpam.com> wrote in message
news:un**************@TK2MSFTNGP14.phx.gbl...
Hi

I have just created a new ASP .net web project and when i run the project
I receieve this error:

System.Reflection.AmbiguousMatchException: Ambiguous match found.

Any help would be much appreciated

Thanks
B


Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: sks_cpp | last post by:
template< class a, class b, class c = int > struct something { }; template< class a, class b > struct something<a, b> { };
4
by: rjd | last post by:
Does anybody else see this in VS.NET 2003? When I get a genuine C++ compiler error (could be anything, usually innocuous) it's regularly followed by a slew of these spurious and completely...
2
by: Denon | last post by:
Hi, everybody I have a web control, build by VB.net, and if I put two instance on the same aspx, error occur while debugging. Parser Error Message: Ambiguous match found. It highlight the...
3
by: Alexandre | last post by:
Hi! I receive this error in my webapp: Ambiguous match found. At line: Line 1: <%@ page language="C#" masterpagefile="~/memberscontents/master_interna.master" autoeventwireup="true"...
3
by: Francois | last post by:
This is from a Dot Net 1.1 project converted to Dot Net 2.0. In 1.1, all was fine without any problem. In 2.0, on the developement machine all seems more or less OK. In release mode on the...
9
by: neildferguson | last post by:
I am using templates with a little project I am working on. My compiler (GCC) is finding a particular construct ambiguous. Can anyone suggest something I might change in the declaration of class...
3
by: i3x171um | last post by:
To start off, I'm using GCC4. Specifically, the MingW (setjmp/longjmp) build of GCC 4.2.1 on Windows XP x64. I'm writing a class that abstracts a message, which can be either an integer (stored as...
2
by: aparna | last post by:
Hi, I have one project in dotnet 1.1and when I am trying to compile that project I am getting "Ambiguous match found" error in code behind file(.aspx.cs) but there is no such file in that...
9
by: sebastian | last post by:
I've simplified the situation quite a bit, but essentially I have something like this: struct foo { }; void bar( foo const & lhs, foo const & rhs )
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.