用Linq简化这段代码:foreach var testEntity in outputTestEntitys if testEntity is null break;
output.TestEntitys?.TakeWhile(testEntity => testEntity != null)?.ToList().ForEach(testEntity => testEntity.Load());
原文地址: https://www.cveoy.top/t/topic/hYTv 著作权归作者所有。请勿转载和采集!