Adds a new DNS record to the zone.
Namespace:
JHSoftware.SimpleDNSPlusAssembly: SDNSAPI (in SDNSAPI)
Version: 1.1.0.0 (1.1.0.0)
Syntax
| C# |
|---|
public DNSRecord Add( string name, string type, params string[] data ) |
| Visual Basic (Declaration) |
|---|
Public Function Add ( _ name As String, _ type As String, _ ParamArray data As String() _ ) As DNSRecord |
Parameters
- name
- Type: System..::.String
Domain name (FQDN) of the new record. This name must either be the same as the zone's name or a sub-name. The name may contain non-english characters in which case it will automatically be punycode encoded.
- type
- Type: System..::.String
The type of the new record. For example "A" or "MX".
- data
- Type: array<System..::.String>[]()[]
One or more string values (depending on the record type) containing the data of the new record. IMPORTANT: The number of data parameters must match exactly the number of data fields for the record type (see "Record types and data fields").
Return Value
A DNSRecord object representing the new DNS record
Remarks
The new DNS record's TTL value will be the zone object's DefaultTTL value.
To use a different value, set the new record's TTL property.