Exemplo n.º 1
0
    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());
    }
Exemplo n.º 2
0
    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());
    }