To get a comma delimited string of filtered values from a datarow for VS 2003

private string FilterValues(DataRow dr, params string[] parm) {
  ArrayList al = new ArrayList();
  foreach (string s in parm) {
    al.Add(dr[s].ToString());
  }
  string[] sArray = (string[]) al.ToArray(typeof(string));

  return string.Join(“,”, sArray);
}

Comments are closed.