This project is read-only.

Unhandled exception when running program

Jun 11, 2011 at 5:04 PM

I am getting .Net Framework Unhandled exception popup message when I run this program or click on tabs. It complains about "Object reference not set to an instance of an object". The first line of the details says it occured at "FormMain.ExtractStringArray(ManagementObject mo."

Jun 25, 2011 at 8:11 PM


I think I saw the same problem. I am running a lot of different virtual network adapters and ran into the same problem. I made some changes to the program (added a null checker.)


private void ExtractStringArray(ManagementObject mo, string prop, string name, bool first)
            string[] dnsOrder = (string[])mo[prop];
            TextBoxIPs.AppendText(name + ": ");
            if (!first) TextBoxIPs.AppendText("\r\n");
            if (dnsOrder != null)
                foreach (var at in dnsOrder)
                    TextBoxIPs.AppendText(at + "\r\n");
                    if (first) break;

Jun 27, 2011 at 9:23 AM

Thanks to TomasN :-)

1.1 Released!