Click or drag to resize
ZenophSMSaddRecipients Method
Adds a list of phone numbers to the destinations list.

Namespace: Zenoph.SMSLib
Assembly: Zenoph.SMSLib (in Zenoph.SMSLib.dll) Version: 2015.9.30.0 (2015.09.30.0)
public int addRecipients(
	List<string> numbers,
	bool igninv


Type: System.Collections.GenericListString
The list of phone numbers to be added to the destinations list.
Type: SystemBoolean

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.

Return Value

Type: Int32
Returns the count of phone numbers from the list that were actually added to the destinations list.
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.

See Also