I have a List called List<Roles> and in this list there is the following columns:
RoleCode (string) - ie. ABC
ActionCreate (bool) - ie. true
ActionUpdate (bool) - ie. true
ActionDelete (bool) - ie. false
ActionAssign (bool) - ie. false
What I want to do is populate a string array as follows:
Need to check if the action is true then create the string array such as using the ie. example.
So I want to append a dash between the rolecode and action stripping the word action for only those that are true. Not sure Linq can be used in thie case. Also was hoping to be able to keep it where if I added a new action later I would not have to hard code for it.