I created windows application. When i am creating registry value through code its working well but after deleting from registry (i am deleting that registry using regedit from cmd). Still showing that value in my code when i am debugging from visual studio.
My code for registry creation
RegistryKey key = Registry.LocalMachine.CreateSubKey(@"SOFTWARE\TOPO");
if (key != null)
{
//key.SetValue("interval", "5000");
key.SetValue("Topos", 1, RegistryValueKind.DWord);
key.Close();
}
then i am checking value from Program.cs
string strval = string.Empty;
RegistryKey key = Registry.LocalMachine.CreateSubKey(@"SOFTWARE\TOPO");
if (key != null)
{
//key.SetValue("interval", "5000");
bb = Convert.ToInt32(key.GetValue("Topos"));
key.Close();
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
if (bb == 1)
{
Application.Run(new frm_mdi());
}
else
{
Application.Run(new frm_activation());
}