Your function is just fine but isn't working because you put the ()
after the last }
. If you move the ()
to the top just next to new List<string>()
the error stops.
Sample below:
List<string> optionList = new List<string>()
{
"AdditionalCardPersonAdressType","AutomaticRaiseCreditLimit","CardDeliveryTimeWeekDay"
};