To connect, you should run the following command in the Command Prompt:
ipconfig /renew
And to disconnect, you should run the following command:
iponfig /release
You can do this easily from C# code:
using System.Diagnostics;
ProcessStartInfo info = new ProcessStartInfo();
info.FileName = "ipconfig";
info.Arguments = "/renew";
info.WindowStyle = ProcessWindowStyle.Hidden;
Process p = Process.Start(info);
p.WaitForExit();
Hope this helps.