>Now this is all fine when the registry value is a string, but it certainly isn't generic. What if the value is an int?Have your method return an object rather than a string.
~~Bonnie
>I have this code:
>
>
>public string GetRegistryValue(string sKeyName, string sKeyValue)
>{
> sKeyPath = "Software\\my_app\\" + sKeyName;
>
> string sRetVal = (string)Registry.LocalMachine.GetValue(sKeyPath, sKeyValue, "");
>
> return sValue;
>}
>
>
>Now this is all fine when the registry value is a string, but it certainly isn't generic. What if the value is an int?
>
>
>Thanks