Query Records using the PointerRecord  class.

The following example demonstrates querying Pointer records (performing a reverse lookup) using the static method called GetPointerRecords().

[C#]

using System;
using aspNetDns;
using aspNetDns.Records;
namespace ConsoleApplication1
{
	class Class1
	{
		[STAThread]
		static void Main(string[] args)
		{

			string LookupRecord = "207.46.134.222";
			PointerRecord[] records = PointerRecord.GetPointerRecords( LookupRecord );

			if( records.Length > 0 )
			{
				for( int i=0;i<records.Length;i++)
				{

					Console.WriteLine( "Pointer Name: " + records[i].PointerName);
				}

			}
			else
			{
				Console.WriteLine( "No Pointer records were found.");
			}


			Console.WriteLine( "done.");
			Console.ReadLine();
		}
	}
}






 

[VB.NET]

Imports aspNetDns
Imports aspNetDns.Records
Module Module1

    Sub Main(ByVal args() As String)

        Dim LookupRecord As String = "207.46.134.222"
        Dim records As PointerRecord() = PointerRecord.GetPointerRecords(LookupRecord)

        If records.Length > 0 Then
            Dim i As Integer
            For i = 0 To records.Length - 1

                Console.WriteLine("Pointer Name: " + records(i).PointerName)
            Next i

        Else
            Console.WriteLine("No Pointer  records were found.")
        End If

        Console.WriteLine("done.")
        Console.ReadLine()

    End Sub 'Main

End Module