Peter Vertes [mailto:[EMAIL PROTECTED]] wrote:

> Console.WriteLine(_remoteKey.GetValue("Foo Bar").ToString());
>
>     I get an exception saying: "Object reference not set to
> an instance of an object".  The only thing that has changed
> here is that the key name whos value I want to get contains a
> space.  The space shouldn't matter because my keyname is in
> quotes, right ?  Is this a bug in RegistryKey.GetValue() or
> am I just overlooking something ?

Did a value for "Foo Bar" exist? If not then null would be returned and
you'd be trying to call .ToString() on null.

HTH,
Drew

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to