public class BigPerformance
{
public decimal Value { get; set; }
}
public class Performance
{
public BigPerformance BigPerf { get; set; }
}
public class Category
{
public Performance Perf { get; set; }
}
如果我打电话:
Category cat = new Category();
cat.Perf.BigPerf.Value = 1.0;
我认为这违反了得墨忒耳定律/最少知识原则?
如果是这样,如果我有大量内部类属性,我该如何解决这个问题?