• DnsClient
  • Readme
  • Api Docs
  • MichaCo.net
This site uses "cookies" - small data files stored locally on your computer - to save information about your preferences when using this site. Learn More.

    Show / Hide Table of Contents

    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).

    Inheritance
    Object
    DnsQuestion
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Namespace: DnsClient
    Assembly: DnsClient.dll
    Syntax
    public class DnsQuestion

    Constructors

    | Improve this Doc View Source

    DnsQuestion(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 query is null.

    | Improve this Doc View Source

    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 query is null.

    Properties

    | Improve this Doc View Source

    QueryName

    Gets the domain name the lookup was runnig for.

    Declaration
    public DnsString QueryName { get; }
    Property Value
    Type Description
    DnsString

    The name of the query.

    | Improve this Doc View Source

    QuestionClass

    Gets the question class.

    Declaration
    public QueryClass QuestionClass { get; }
    Property Value
    Type Description
    QueryClass

    The question class.

    | Improve this Doc View Source

    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 Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    Object.ToString()
    | Improve this Doc View Source

    ToString(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.

    • Improve this Doc
    • View Source
    © 2025 by Michael Conrad. All rights reserved. - MichaCo.net