Forum Discussion
sameburn
OneStream Employee
2 days agoHi Kenn
If you are working with a Member List you can use something like this Linq syntax (see vb example below).
** This assumes that we are using object Member in our list and therefore we can access Name property
Dim List(of Member) distinctByName = yourMemberList _
.GroupBy(Function(p) p.Name) _
.Select(Function(g) g.First()) _
.ToList()
This will get the First instance of duplicate e.g C#Local in your example. If you want Last, simply change syntax to be .Last() instead
Hope this helps
Sam
Related Content
- 2 years ago
- 3 years ago
- 2 years ago