摘要: FeatureEnvy(依恋情结)官方的:函数对某个类的兴趣高过对自己所处类的兴趣。影响:数据和行为不在一处,修改不可控。Demo:媒婆、一小伙、一小姑娘场景一:函数的全部数据都来自于另外一个类媒婆、小伙先出场public class Boy { public string Name { get; set; } public int Age { get; set; } public string Adress { get; set; } public bool IsSinglehood { get; set; } pu... 阅读全文
posted @ 2012-09-03 19:16 花房姑娘 阅读(1941) 评论(0) 推荐(2)