How to draw a foreach loop on a block diagram?
foreach (Order p in order) { states[i] = new StateOrder(p.id, p.client, p.dateOrder,p.costOrder, p.haircut, p.admin); } How to draw a foreach loop on a block diagram?
foreach (Order p in order) { states[i] = new StateOrder(p.id, p.client, p.dateOrder,p.costOrder, p.haircut, p.admin); } The same element is used as for any other cycle.
If we are talking about GOST block diagrams, then two blocks are used "3.2.2.6. Cycle boundary".
For the UML Activity Diagram, use the composite Activity with the stereotype "Loop".
If the evil teacher allows you to use only the basic blocks - expand the cycle in accordance with the specification of the language and draw a flowchart for it:
var enumerator = enumerable.GetEnumerator(); try { while (enumerator.MoveNext()) { var current = enumerator.Current; // Тело цикла } } finally { if (enumerator is IDisposable) ((IDisposable)enumerator).Dispose(); } Source: https://ru.stackoverflow.com/questions/608054/
All Articles