我无法理解为什么我的部分代码无法解析其他部分。无法访问属于同一类的属性
我有这个类包含两个属性。第二个属性依赖于第一,但它不断抛出这个错误:
public class Financials
{
public static IEnumerable<SalaryEntity> yearlyEmployees = FactoryManagement(12345);
//cannot resolve symbol 'yearlyEmployees'
public static IEnumerable<CompanyEntity> YearlyGroup(IList<yearlyEmployees> allExempt)
{
}
}
我敢肯定有一个简单的答案,但我无法找到它。
谢谢!