未处理的“System.StackOverflowException”类型的异常出现在 mscorlib.dll

出现:未处理的“System.StackOverflowException”类型的异常出现在 mscorlib.dll

的情况肯定为有死循环:

  1,事件处理的彼此调用

    void EventA(object sender,EventHandler e)

    {

      EventB(sender,e);

    }

    void EventB(object sender,EventHandler e)

    {

      EventA(sender,e);

    }

  2,方法调用

  void funA()

  {

    funB();

  }

  void funB()

  {

    funA();

  }

原文地址:https://www.cnblogs.com/lingfengchencn/p/StackOverflowException.html