public static string JoinStrings(this DataReader reader, int ColumnIndex, string delimiter) { var result = new StringBuidler(); var delim = String.Empty; while (reader.Read()) { result.Append(delim).Append(reader[ColumnIndex].ToString()); delim = delimiter; } return(result.ToString()); }
public static string JoinStrings(this DataReader reader, int position, string delimiter) { string delim = ""; StringBuilder sb = new StringBuidler(); while (reader.Read()) { sb.Append(reader[position]).Append(delim); delim = delimiter; } return(sb.ToString()); }