Class DnsQuestion
The DnsQuestion class transports information of the lookup query performed by IDnsQuery.
A list of questions is returned by IDnsQueryResponse (although, the list will always contain only one DnsQuestion).
Inherited Members
Namespace: DnsClient
Assembly: DnsClient.dll
Syntax
public class DnsQuestion
Constructors
| Improve this Doc View SourceDnsQuestion(DnsString, QueryType, QueryClass)
Initializes a new instance of the DnsQuestion class.
Declaration
public DnsQuestion(DnsString query, QueryType questionType, QueryClass questionClass = QueryClass.IN)
Parameters
| Type | Name | Description |
|---|---|---|
| DnsString | query | The query. |
| QueryType | questionType | Type of the question. |
| QueryClass | questionClass | The question class. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If |
DnsQuestion(String, QueryType, QueryClass)
Initializes a new instance of the DnsQuestion class.
Declaration
public DnsQuestion(string query, QueryType questionType, QueryClass questionClass = QueryClass.IN)
Parameters
| Type | Name | Description |
|---|---|---|
| String | query | The query. |
| QueryType | questionType | Type of the question. |
| QueryClass | questionClass | The question class. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If |
Properties
| Improve this Doc View SourceQueryName
Gets the domain name the lookup was runnig for.
Declaration
public DnsString QueryName { get; }
Property Value
| Type | Description |
|---|---|
| DnsString | The name of the query. |
QuestionClass
Gets the question class.
Declaration
public QueryClass QuestionClass { get; }
Property Value
| Type | Description |
|---|---|
| QueryClass | The question class. |
QuestionType
Gets the type of the question.
Declaration
public QueryType QuestionType { get; }
Property Value
| Type | Description |
|---|---|
| QueryType | The type of the question. |
Methods
| Improve this Doc View SourceToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| String |
Overrides
| Improve this Doc View SourceToString(Int32)
Returns the information of this instance in a friendly format with an optional offset.
Declaration
public string ToString(int offset = -32)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | offset | The optional offset which can be used for pretty printing. |
Returns
| Type | Description |
|---|---|
| String | The string representation of this instance. |