M
Mark Pitman
If you look up the RegistryKey.IDisposable.Dispose Method in the MSDN
documentation (http://tinyurl.com/4rxra) it states the following:
"This member supports the .NET Framework infrastructure and is not
intended to be used directly from your code."
However, if you go to the overview of the RegistryKey class
(http://tinyurl.com/3q9ge) and look at the C# sample, they place the
RegistryKey instantiation inside of a using statement, which will end
up calling Dispose() on the RegistryKey object. So which is it? Are we
supposed to be calling Dispose() on this class or not?
documentation (http://tinyurl.com/4rxra) it states the following:
"This member supports the .NET Framework infrastructure and is not
intended to be used directly from your code."
However, if you go to the overview of the RegistryKey class
(http://tinyurl.com/3q9ge) and look at the C# sample, they place the
RegistryKey instantiation inside of a using statement, which will end
up calling Dispose() on the RegistryKey object. So which is it? Are we
supposed to be calling Dispose() on this class or not?