Question: A little newbie question. I have a foreach loop where I am trying to access the property of a row object and assign to a string.

```
foreach(row in Dataset)
{
 string finalName= row.name;

}

```

On each iteration I need to concat each row's name property to the finalName 

\Thanks alot,

Answer: 
Just a couple of things...

1. `DataSet`'s don't have rows, they have `DataTable`s, and those `DataTable`s have `DataRows`
2. You can use the `+=` operator to perform a concatenation, though the general advice is that a `StringBuilder` object is better suited to this for performance and memory reasons.

Assuming your `DataSet` has one `DataTable` and the column you're after is called `name`, you can use either of these (the first using the `+=` operator, the second using a `StringBuilder`)

```
string finalName = string.Empty;

foreach(DataRow row in dataSet.Tables[0].Rows)
{
    finalName += row["name"].ToString();
}

```

or

```
System.Text.StringBuilder builder = new System.Text.StringBuilder();

foreach(DataRow row in dataSet.Tables[0].Rows)
{
    builder.Append(row["name"].ToString());
}

string finalName = builder.ToString();

```
you can add the values into a list and then join the values in the list

```
List<string> listRows = new List<string>();
    string rowValues = string.Empty;

    foreach(row in DataSet)
    {
        string fileName = row.name;
        listRows.Add(fileName);
    }

    rowValues = string.Join(",", listRows);

```