I try to group those of file revision which have the same root and make relationship between them
For example:
1.17
1.17.1.1
1.17.1.2
1.17.1.2.1.1
1.17.2.1
1.17.2.2
1.18
1.19
Now I would like to group
1.17, 1.18, 1.19 as the same group and make relationship is parent 1
1.17.1.1, 1.17.1.2 as the same group and make relationship is child 1.1
1.17.2.1, 1.17.2.2 as the same group and make relationship is child 1.2
1.17.1.2.1.1 as the same group and make relationship is grandchild 1.1.1
My idea is loop through the list and try to find number of digit by split by dot then compare it with those of list but it's seem to bad
I don't know is there any best way in VB.NET to achieve it?
The output maybe a datatable, with each data row index revision relationship 1 1.17, 1.18, 1.19 1 2 1.17.1.1, 1.17.1.2 1.1 3 1.17.2.1, 1.17.2.2 1.2 4 1.17.1.2.1.1 1.1.1
The relationship between them 1.17, 1.18, 1.19 (maybe have 1.20, 1.21...) are grouped as a root group 1.17.1.1, 1.17.1.2 (maybe have 1.17.1.3, 1.17.1.4...) are grouped as first child group of root group 1.17.2.1, 1.17.2.2 (maybe have 1.17.2.3, 1.17.2.4...) are grouped as second child group of root group 1.17.1.2.1.1 which have the same path with first child group (1.17.1.1.x.y) are grouped as a first grand child group of first child group
I really appreciate for any help and thanks so much for it.