If you want it casted to a specific type you can use this method. Most non primitive types won't by default support direct casting so you will have to handle those accordingly.
public T GetValue<T>(string registryKeyPath, string value, T defaultValue = default(T))
{
T retVal = default(T);
retVal = (T)Registry.GetValue(registryKeyPath, value, defaultValue);
return retVal;
}