Visual Basic:
Dim objRegistry As RegistryKey = Registry.ClassesRoot
Dim objDefaultIcon As RegistryKey = Registry.ClassesRoot
Dim Names() As String = objRegistry.GetSubKeyNames
For i As Int32 = 1 To Names.Length - 1
If Mid(Names(i), 1, 1) <> "." Then Exit For
objRegistry = objRegistry.OpenSubKey(Names(i))
objDefaultIcon = objDefaultIcon.OpenSubKey(objRegistry.GetValue("") & "\DefaultIcon")
Console.WriteLine(Names(i) & objDefaultIcon.GetValue("").ToString)
ExtentionCollection.Add(i, Names(i))
Next
the loops runs once...and then i get the error...maybe iam missing something simple...but i dont get it