❔ 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
Angius8mo ago
Sounds like LINQ could help tasks.Where(t => t.Dependents.Count <= 0)
jcotton42
jcotton428mo ago
from my understanding this is basically a directed graph
Accord
Accord8mo 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.