日期:2014-05-17 浏览次数:20542 次
for(int i=0;i<20;i++){ string[] LastNameList =new string[] {"张","王","李","刘","陈","杨","黄","孙","周","吴","徐","赵"}; LastNameList=LastNameList.OrderBy().ToArray(); string myLastName=LastNameList[i]; }
例如: for(int i=0;i<20;i++){ string[] LastNameList =new string[] {"张","王","李","刘","陈","杨","黄","孙","周","吴","徐","赵"}; LastNameList=LastNameList.OrderBy().ToArray(); string myLastName=LastNameList[i]; } 我想要实现的功能是,每次循环时,myLastName的值是随机的。