Skip to content

Potential missing detail #19323

Closed
Closed
@deliverystack

Description

@deliverystack

Hello,

Parallel.Foreach documentation could discuss the issue of captured variables in a loop - whether each iteration gets its own variables or if the developer has any concerns about sharing. From the code example, it appears that the developer need not create their own copy of currentFile within the loop.

https://stackoverflow.com/questions/271440/captured-variable-in-a-loop-in-c-sharp

Best regards.

-John

[Enter feedback here]


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions