Code Analysis ReferenceFixesCS0127On this pageCS0127PropertyValueTitleSince 'function' returns void, a return keyword must not be followed by an object expression.SeverityErrorCode FixesChange member type according to return expressionRemove 'return' keywordRemove return expressionSee AlsoOfficial Documentation