M
mikew
The following code isn't working and I don't understand the error. Would
someone please shed some light on what I'm doing wrong. Thanks.
The error I recieve is:
An unhandled exception of type 'System.NullReferenceException'
occurred....additional information: Object reference not set to an instance
of an object.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim key As Microsoft.Win32.RegistryKey
key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE", True)
key.DeleteSubKeyTree("TestTree1")
End Sub
Thanks,
mike
someone please shed some light on what I'm doing wrong. Thanks.
The error I recieve is:
An unhandled exception of type 'System.NullReferenceException'
occurred....additional information: Object reference not set to an instance
of an object.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim key As Microsoft.Win32.RegistryKey
key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE", True)
key.DeleteSubKeyTree("TestTree1")
End Sub
Thanks,
mike