Yogi_Bear_79,
Well, one is opening a key, the other is creating it. It all depends on
the action you want to take.
As far as the key is concerned, you are using the using statement, so
any resources associated with the instance will be released when the using
block is exited.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Yogi_Bear_79" <IT*****@spamfree.com> wrote in message
news:9u********************@comcast.com...
I've been accesing the registry in the two following ways:
using (RegistryKey SubKey = Registry.LocalMachine.OpenSubKey(sSubKey + x))
using (RegistryKey Key = Registry.LocalMachine.CreateSubKey(sSubKey + x))
Should I close the Keys after either or both of these actions? Can you
explain the benifits of either action?