I’m translating a Java program to vb.net where settings in the application is controlled by a enum.
private enum SmsTagRule {
// KEYWORD DOMAIN BusinessClass PREFIX SEARCHNAME SEARCHPARAM SENDEMAIL KEYWORDS...
BAG_TAG("BagTag", "BagTag", "FoundBagTag", "b", "SearchBagTag", "490_TagNumber", true, "BagTag"),
SKI_TAG("SkiTag", "SkiTag", "FoundSkiTag", "a", "SearchSki", "518_LabelNo", false, "SkiTag", "ski"),
PC_TAG("PcTag", "ds", "FoundPC", "", "SearchPcTag", "585_LabelNo", false, "pc");
And depending on witch “TAG” in chosen different settings are getting returned. Is there any way to do this in vb.NET. I have thought about creating one enum for each one of these TAG’s but it seems like it should be a better solution to this.
Any Ideas?
Go on and create a custom Type representing your settings:
And you can use it like this: