C
C#16mo ago
TomasGnG 😴

❔ How to properly sort Tasks with dependents?

So I have a program where a user can write a text file with unlimited tasks (id, name, time and depends) which will be then serialized by the program. After the program read all correctly formatted tasks it will put all the tasks in a DataGridView but now I dont know how to sort the tasks. Sorting: 1. Tasks that doesnt need any other tasks to be done 2. Tasks that have to be done for xy task
3 Replies
Angius
Angius16mo ago
Sounds like LINQ could help tasks.Where(t => t.Dependents.Count <= 0)
jcotton42
jcotton4216mo ago
from my understanding this is basically a directed graph
Accord
Accord16mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.

Did you find this page helpful?