23 lines
497 B
C#
23 lines
497 B
C#
using System;
|
|
using Microsoft.Win32;
|
|
|
|
namespace BCG
|
|
{
|
|
internal static class DoubleRegistryHandler
|
|
{
|
|
public static void setValue (RegistryKey rk, string name, double value)
|
|
{
|
|
rk.SetValue (name, value.ToString ());
|
|
}
|
|
|
|
public static double getValue (RegistryKey rk, string name)
|
|
{
|
|
object v = rk.GetValue (name);
|
|
if (v != null)
|
|
return double.Parse (v.ToString ());
|
|
else
|
|
return double.NaN;
|
|
}
|
|
}
|
|
}
|