public static IList <SqlParameter> CloneParam(SqlParameterCollection parameters) { if (parameters == null || parameters.Count == 0) { return(null); } var res = new List <SqlParameter>(); var numerator = parameters.GetEnumerator(); while (numerator.MoveNext()) { res.Add(numerator.Current as SqlParameter); } return(res); }