Move the close bracket!
public static class Data
{
public const int MAX = 5;
public static int top = -1;
public int[] stack = new int[MAX];
}
This is the totality of your Data class, because the close bracket ends the definition.
You need the push, pop and display methods to be within the Data class, so move the close curly bracket below the Main method.