S
shapper
Hello,
I have an enum as follows:
Public Enum Feature
Title
Content
Date
Search
End
And a generic list:
Dim features As Generic.List(Of Feature)
I need to do 2 things:
1. Remove duplicate elements from my generic list (I am not sure if
generic.list allows to add duplicate elements)
2. Reorder the features according to a variable:
if a = 1 Then
Reorder features as follows:
Search, Title, Content, Date
elseif a = 2
Reorder features as follows:
Title, Search, Date, Content
...
Note: features might have all elements in feature enum or not ...
however that shouldn't affect the order.
For example, if features include Search and Content and a
= 1 then the order would be:
Search, Content
How can I do this?
Thank You,
Miguel
I have an enum as follows:
Public Enum Feature
Title
Content
Date
Search
End
And a generic list:
Dim features As Generic.List(Of Feature)
I need to do 2 things:
1. Remove duplicate elements from my generic list (I am not sure if
generic.list allows to add duplicate elements)
2. Reorder the features according to a variable:
if a = 1 Then
Reorder features as follows:
Search, Title, Content, Date
elseif a = 2
Reorder features as follows:
Title, Search, Date, Content
...
Note: features might have all elements in feature enum or not ...
however that shouldn't affect the order.
For example, if features include Search and Content and a
= 1 then the order would be:
Search, Content
How can I do this?
Thank You,
Miguel