1.缓存,如写文件的时候 2.封装,便于开发和维护 3.使用委托delegate,功能结构清晰 4.减少构造,如string中使用 += 来替换 a = a + b + c ;循环中公用变量 5.使用索引方法,如map