// 自定义Linq相关代码 // 主要是一些CommonUseage代码 // using System; using System.Collections.Generic; // // public static class LinqS { public static List ToStringList(string[] InStringArray ) { if( InStringArray == null ) { return null; } List Items = new List(InStringArray.Length); for( int i=0; i InPredicate ) { if (InStringArray == null) { return null; } List Results = new List(InStringArray.Length); for( int i=0; i( T[] InArray, T InTest ) { if( InArray == null || InArray.Length == 0 ) { return false; } for( int i=0; i.Equals(InArray[i], InTest ) ) { return true; } } return false; } public static T[] ToArray( List InList ) { if( InList == null ) { return null; } T[] Results = new T[InList.Count]; for( int i=0; i