无法将类型"void"隐式转换为"bool"

无法将类型

问题描述:

为什么这是一段代码:

    protected bool IsServerPeer(InitRequest initRequest)
    {
        return _subServerCollection.IsServerPeer(initRequest);
    }

创建错误:

不能将类型'void'隐式转换为'bool'

Cannot implicitly convert type 'void' to 'bool'

可能是因为_subServerCollection.IsServerPeer()具有返回类型void

Probably because _subServerCollection.IsServerPeer() has the return type void