I get an object reference not set to instance of object exception being thrown here in this sample code. This is when I set a Messagebox right after the catch statement Is there any reason why this might happen ? and then right after that appears the following:
An unhandled exception of type 'System.ArgumentNullException' occurred in system.windows.forms.dll
Additional information: Value cannot be null.
My current XML file has no information missing in any of the fields.
It looks like this:
Code:
<?xml version="1.0" ?>
- <Address xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<FirstName>Christopher</FirstName>
<LastName>Mais</LastName>
<CompanyName>None</CompanyName>
<Address1>853 east 229 St</Address1>
<Address2> 1st fl</Address2>
<City>Bronx</City>
<Region>New York</Region>
<PostalCode>10466</PostalCode>
<Country>US</Country>
<Email>[email protected]</Email>
</Address>