I have a lot of if, else if statements and I know there has to be a better way to do this but even after searching stackoverflow I\'m unsure of how to do so in my particular cas
you can use dictionary.
Dictionary textValue = new Dictionary(); foreach (KeyValuePair textKey in textValue) { if(txtvar.BillText.IndexOf(textKey.Key) > -1) return textKey.Value; }