DnsQuestion Class

Represents a DNS question in the question section of a DNS message.

public sealed class DnsQuestion

Constructors

NameDescription
DnsQuestion(string, DnsQueryType, DnsQueryClass)Initializes a new instance of the DnsQuestion class.

DnsQuestion(string, DnsQueryType, DnsQueryClass)

DnsQuestion.cs

Initializes a new instance of the DnsQuestion class.

public DnsQuestion(string name, DnsQueryType type, DnsQueryClass queryClass = DnsQueryClass.IN)

Parameters

name string
The domain name to query.
type DnsQueryType
The DNS record type to query.
queryClass DnsQueryClass
The DNS query class.

Properties

NameDescription
NameGets the domain name being queried.
QueryClassGets the DNS class being queried.
TypeGets the DNS record type being queried.

Gets the domain name being queried.

public string Name { get; }

Property value

string

QueryClass

DnsQuestion.cs

Gets the DNS class being queried.

public DnsQueryClass QueryClass { get; }

Property value

DnsQueryClass

Gets the DNS record type being queried.

public DnsQueryType Type { get; }

Property value

DnsQueryType