به نام خدا سلام بر برنامه نویسان عزیز 😉 در این مطلب آموزش حذف یک setting از رجیستری با متد DeleteValue در #C را آماده کردم. انشاالله که این کد سی شارپ براتون مفید باشد.
کد حذف یک setting از رجیستری با متد DeleteValue در #C :
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Win32;
public class MainClass{
static void Main(string[] args){
string strKey;
string strSetting;
string strAns;
Console.WriteLine("Enter the key");
strKey = Console.ReadLine();
RegistryKey TestProject = Registry.CurrentUser.OpenSubKey(strKey, true);
Console.WriteLine("Enter the setting");
strSetting = Console.ReadLine();
Console.WriteLine("Do you really mean to delete: " + strKey + "\" + strSetting + "?");
strAns = Console.ReadLine();
strAns = strAns.ToUpper();
using System.Collections.Generic;
using System.Text;
using Microsoft.Win32;
public class MainClass{
static void Main(string[] args){
string strKey;
string strSetting;
string strAns;
Console.WriteLine("Enter the key");
strKey = Console.ReadLine();
RegistryKey TestProject = Registry.CurrentUser.OpenSubKey(strKey, true);
Console.WriteLine("Enter the setting");
strSetting = Console.ReadLine();
Console.WriteLine("Do you really mean to delete: " + strKey + "\" + strSetting + "?");
strAns = Console.ReadLine();
strAns = strAns.ToUpper();