EmailAddressValidatorArrayToDataTable Method
Converts a string array into DataTable containing a single column named "email".

Namespace: MailBee.AddressCheck
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.3.1 build 666 for .NET 4.5
public DataTable ArrayToDataTable(
	string[] emails


Type: SystemString
The strings to be put into the resulting data table.

Return Value

Type: DataTable
The data table containing all the strings from the given array put under the "email" column.
MailBeeInvalidArgumentExceptionemails is a null reference (Nothing in Visual Basic).
This method is helpful if you need to pass a string array to BeginVerify(DataTable, IDataReader, String, AsyncCallback, Object) asynchronous method which accepts only DataTable as input. At the same time, normal version of Verify method already has Verify(String) overload which accepts string arrays directly.
The sample below is actually exerpt from MailBee.NET Objects source code which contains the essential parts of ArrayToDataTable(String) method. You can use it as a template to copy-paste and edit if you need to populate DataTable from other sources (like collections, lists or whatever).
public DataTable ArrayToDataTable(string[] emails)
    DataTable workTable = new DataTable();
    workTable.Columns.Add("email", typeof(string));
    foreach (string email in emails)
        DataRow row = workTable.NewRow();
        row["email"] = email;
    return workTable;
See Also