Records Property
Collection of records in the last response.
Syntax
[VB.NET] Public ReadOnlyProperty Records As DNSRecordList
[C#] public DNSRecordList Records {get;}
Remarks
Once the query is complete, a single Response event will fire, and the following properties will contain the results:
StatusCode | The success or error code of the DNS query. |
Status | A standard string interpretation of StatusCode. |
Records | The Records in the last DNS response. |
RecordSource | The source (type) of records being listed. |
This collection is indexed from 0 to Count - 1.
Example (Loop through all fields of all records)
For i = 0 to DNSControl.Records.Count - 1 For j = 0 to DNSControl.Records.FieldCount(i) - 1 DNSControl.Records(i).FieldIndex = j DoSomethingWith(DNSControl.Records(i).FieldName, DNSControl.Records(i).FieldValue) Next j Next i
This property is read-only and not available at design time.