public int addRecipients( List<string> numbers, bool igninv )
Public Function addRecipients ( numbers As List(Of String), igninv As Boolean ) As Integer
public: int addRecipients( List<String^>^ numbers, bool igninv )
An indicator that tells whether or not the method should ignore the throwing of Exception when a phone number in the list is rejected for its invalidity or when it is not allowed on the user's routes.
|Exception||Thrown if numbers is null.|
The essence of igninv is particularly to prevent the iteration of adding phone numbers. This can be achieved by setting igninv to true. In this case, the method will not terminate and thrown an Exception when any of the phone numbers is invalid or not allowed on the routes. It will ignore it and check the next one.
Whe there is the need to ensure that all phone numbers are added before submission, igninv can be set to false. Then when a phone number is rejected, the iteration will be terminated and Exception thrown to notify the rejection.
The method also ensures that each phone number does not already exist before being added. If a phone number already exists, it will not be added to the destinations list.