0

I created a project "Control Panel" and I referenced another project called wServer and made a static method in ChatManager class in the wServer project

public static void ControlPanelSay(string text)
        {
            foreach (var i in manager.Clients.Values)
                i.SendPacket(new TextPacket
                {
                    BubbleTime = 0,
                    Stars = -1,
                    Name = "Admin",
                    Text = text
                });
            log.InfoFormat("<Admin>: {0}", text);
        }

When I run this method from wServer project it works fine how it should, but when I run it from the Control Panel project it throws this error: Error

The code that executes the method:

private void sendChatButton_Click(object sender, EventArgs e)
{
    ChatManager.ControlPanelSay(chatSendTextBox.Text);
}
Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Versified
  • 54
  • 5
  • Please include the exception's type, message and stack trace. These are the information that will lead you to a solution, or if not, may help us to find the problem. How should we guess what's wrong without knowing the error message? – René Vogt Feb 01 '17 at 17:42
  • I debugged it and found this: ![Error](http://image.prntscr.com/image/ada1be2ff765430087e350c3288c08e0.png) – Versified Feb 01 '17 at 17:44
  • But you do see the "Details" button? – René Vogt Feb 01 '17 at 17:44
  • http://image.prntscr.com/image/ada1be2ff765430087e350c3288c08e0.png is what I got when I debugged it @RenéVogt – Versified Feb 01 '17 at 17:54

0 Answers0