Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

'Label' is an Ambigous reference

Status
Not open for further replies.
Oct 2, 2002
104
US
Label lbl;

is all I have as a declaration, but I get "'Label' is an Ambigous reference" when I try to run.

This code seemed to work fine in another project, just not here.

Any idea what might be the problem?
 
The compiler is telling you that when it searches the list of references in your project it's finding two or more classes with the name "Label". Perhaps you're referencing both the windows forms and the web forms libraries? Or maybe you have another class you've written called "Label"?

To fix this you need to either track down & remove the extra references, or, if you need both of them, you'd use the fully qualified name for Label: System.Windows.Forms.Label

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top