0
Reply

How to Flush DNS Cache using .NET Inbuit Library Components

Harsha Dev

Harsha Dev

Apr 21 2013 3:07 AM
3.1k
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 :)