0
Answer

How to Flush DNS Cache using .NET Inbuit Library Components

Harsha Dev

Harsha Dev

11y
3.1k
1
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 :)