Application does not contain a definition for 'Run'

O

ohayo

In a windows form app (which acts as a front end to my quickfix
application), I get the following error on compiling

Application does not contain a definition for 'Run'.

What does this mean, thanks for any pointers.
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

Humm, Do you by any chance have a class named Application?

Change the name of it, or locate this method :
[STAThread]

static void Main()

{

Application.Run(new Form1());

}



and change the line for this: System.Windows.Forms.Application.Run( ... )





cheers,
 
S

Slaven

ohayo said:
In a windows form app (which acts as a front end to my quickfix
application), I get the following error on compiling

Application does not contain a definition for 'Run'.

What does this mean, thanks for any pointers.

That application does not contain a definition for 'Run'. B-|
 
C

Chris Dunaway

Can you show the code where you're accessing the Application object?
If you are creating and instance of it, then Run would not be
accessible as static members are not accessible from an instance of the
class.
 

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

Top