Code Analysis ReferenceFixesCS1621On this pageCS1621PropertyValueTitleThe yield statement cannot be used inside an anonymous method or lambda expression.SeverityErrorCode FixesRemove 'yield' keywordSee AlsoOfficial Documentation