This error occurs if you declare a non-static member in a class that is declared static. It is not possible to create instances of static classes, so instance variables would not be meaningful. The static keyword should be applied to all members of static classes.
In this example get_application_process is not declared as static
static class Program
{
private void get_application_process()
{
Process apProcess;
String sModuleName;
}
Solution:
private static void get_application_process()
should solve the problem
No comments:
Post a Comment