Harsha Dev

Harsha Dev

  • 1.7k
  • 82
  • 4.4k

How to Flush DNS Cache using .NET Inbuit Library Components

Apr 21 2013 3:07 AM
using System.Runtime.InteropServices;

[DllImport("dnsapi.dll",EntryPoint="DnsFlushResolverCache")]
private static extern UInt32 DnsFlushResolverCache ();

public static void FlushMyCache() //This can be named whatever name you want and is the function you will call
{
    UInt32 result = DnsFlushResolverCache();
}


How To Implement this in Program.cs file Window Application. Can u please me in This :)