MasterServer.ipAddress showing unexpected symbol '='

I am trying to run my own masterserver. I want to change the ipaddress of the masterserver.
I used the following line of code:
MasterServer.ipAddress = “my ipaddress”;
But it is showing the following error:
Unexpected symbol ‘=’ in class, struct or interface number declaration.
Please help.

The line of code you try to execute is not a declaration but a pure assignment operation. Such an operation can only be executed from a method. A class can only contain definitions / declarations of variables / fields and methods.

You most likely want to set the ip inside Awake or Start

// C#
void Start()
{
    MasterServer.ipAddress = "my ipaddress";
}

If this doesn’t solve your problem, you should edit your question and add more details as you provide almost no context.