S
shapper
Hello,
I have a list of a class, Theme, which has two properties:
IList<Level> Levels and String LevelsCsv.
Level is an enumeration ...
LevelsCsv is in CSV format where each item is an item of the
enumeration.
So basically I need to go through each theme and convert the LevelsCvs
format to IList<Level>
foreach (Theme t in AllThemes) {
t.Levels = t.LevelsCsv.Split(new char[] { ',' },
StringSplitOptions.RemoveEmptyEntries) ??? )
}
My problem is more with the parsing the CSV elements to enumeration
values.
How can I do this?
Thanks,
Miguel
I have a list of a class, Theme, which has two properties:
IList<Level> Levels and String LevelsCsv.
Level is an enumeration ...
LevelsCsv is in CSV format where each item is an item of the
enumeration.
So basically I need to go through each theme and convert the LevelsCvs
format to IList<Level>
foreach (Theme t in AllThemes) {
t.Levels = t.LevelsCsv.Split(new char[] { ',' },
StringSplitOptions.RemoveEmptyEntries) ??? )
}
My problem is more with the parsing the CSV elements to enumeration
values.
How can I do this?
Thanks,
Miguel