c# - How to make a dropdown list of all cultures (but no repeats) -
i'm trying make 2 dropdown lists.
the top 1 offers cultures, (but no repeats). example: english, spanish, filipino
after selecting top list bottom list show specific types.
i right use code top list.
foreach (cultureinfo cultureinfo in cultureinfo.getcultures(culturetypes.neutralcultures))
however not show filipino (philippines) i'd rather not use getcultures(culturetypes.allcultures)) because shows many @ once.
it seems may need load neutralcultures ilist. iterate through allcultures make sure it's threeletterisolanguagename in list, if not add it.
there best practice this?
thanks
look @ reference different culturetypes
values. tells included each.
i guess want that's in specific cultures? either combine non-specific cultures set or cultures , exclude specific ones. second approach easiest express in linq:
var cultures = cultureinfo.getcultures(culturetypes.allcultures) .except(cultureinfo.getcultures(culturetypes.specificcultures));
Comments
Post a Comment