Based on this [example](http://reedcopsey.com/2010/01/22/parallelism-in-net-part-4-imperative-data-parallelism-aggregation/) I'm trying to make a parallel foreach with tuple return.

```
double min = double.MaxValue;

object syncObject = new object(); 
Parallel.ForEach(collection, () => double.MaxValue, (item, loopState, 
    localState) =>
    {
        double value = item.PerformComputation();
        return System.Math.Min(localState, value);
    },
    localState =>
    {
        lock(syncObj)
            min = System.Math.Min(min, localState);
    }
);

Console.Write(min + "\n");

```

The above code works fine but in my occasion(correct minimum value) but i don't want to output the minimum value but the 'name' of that value so i tried something like this:

```
double min = double.MaxValue;
string minName = "";

object syncObject = new object(); 
Parallel.ForEach(collection, () => Tuple.Create(double.MaxValue, ""), (item, 
    loopState, localState) =>
    {
        double value = PerformComputation(item.Item1.Value);
        string name = item.Item1.Key;

        return //helpHere
    },
    localState =>
    {
        lock(syncObj)
            min = //help here
            minName = //help here
    }
);

Console.Write(minName + "\n");

```

Tried couple things that didn't work. Also I've read [microsoft's example](https://learn.microsoft.com/en-us/dotnet/standard/parallel-programming/how-to-write-a-parallel-foreach-loop-with-thread-local-variables) without luck. 
Any help appreciated.