摘要: 参数数组的应用场景:它允许我们在调用一个方法时提供数量可变的参数,而不是由方法事先固定好的数量一个例子:有时候路径中的文件夹数量是大于一的,调用者希望将额外的文件夹关联起来,以构成一个完整的路径,那么如何编码呢?using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 学习{ class 参数数组 { public static void MyParams(params string[] paths) { s... 阅读全文
posted @ 2012-04-12 09:25 xinyebs 阅读(331) 评论(0) 推荐(0)