Set DateTime value to the Registry : Registry Save « Windows « C# / CSharp Tutorial






using System;
using Microsoft.Win32;

class MainClass
{
    public static void Main(String[] args)
    {
        Registry.SetValue(
            @"HKEY_CURRENT_USER\Software\CompanyName\SoftwareName",
            "DateTimeValue", DateTime.Now.ToString(), RegistryValueKind.String);

    }
}








29.2.Registry Save
29.2.1.Save int value to Registry
29.2.2.Set DateTime value to the Registry
29.2.3.Set String value to the Registry
29.2.4.Save user prefs to registry
29.2.5.delete a key from Registry
29.2.6.Delete a setting in Registry