Application is ambiguous reference'. error

  • Thread starter Thread starter shailendrapalsingh
  • Start date Start date
S

shailendrapalsingh

hi all
i am trying to read excel file through my program. but when i compile
i get "Application is ambiguous reference'. error.
i am including using Excel;
 
Hi,

Probably the Excel namespace has an Application class defined, if so it can
collide with System.Windows.Form.Application class. The solution is to
fully qualify the class: Excel.Application
 
And how would you do that? I'm having the same issue, but I don't know
how to "fully qualify the class".

Any help is much appreciated. Thanks!
 
Fully qualify your application run method like so:

static void Main(string[] args)
{
System.Windows.Forms.Application.Run(new fmBOM());
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top