the
cl.display();
in
cl1
is not inside a method body.
cl.Display();
in your
Program class
works because it is part of the
Main
method.
You should change
cl1
so it looks something like this:
public class cl1
{
public void SomeMethod()
{
cl.display();
}
}