<p>I am using .Net 2 and the normal way to store my settings. I store my custom object serialized to xml. I am trying to retrieve the default value of the property (but without reseting other properties). I use:</p>

<pre><code>ValuationInput valuationInput = (ValuationInput) Settings.Default.Properties["ValuationInput"].DefaultValue;
</code></pre>

<p>But it seems to return a string instead of ValuationInput and it throws an exception. </p>

<p>I made a quick hack, which works fine:</p>

<pre><code>string valuationInputStr = (string) 
Settings.Default.Properties["ValuationInput"].DefaultValue;
XmlSerializer xmlSerializer = new XmlSerializer(typeof(ValuationInput));
ValuationInput valuationInput = (ValuationInput) xmlSerializer.Deserialize(new StringReader(valuationInputStr));
</code></pre>

<p>But this is really ugly - when I use all the tool to define a strongly typed setting, I don't want to serialize the default value myself, I would like to read it the same way as I read the current value: <code>ValuationInput valuationInput = Settings.Default.ValuationInput;</code></p>

[{'answer_id': 166316, 'author': 'MSalters', 'author_id': 15416, 'author_profile': 'https://Stackoverflow.com/users/15416', 'pm_score': 3, 'selected': True, 'text': '<p>BEX=Buffer overflow exception. See <a href="http://technet.microsoft.com/en-us/library/cc738483.aspx" rel="nofollow noreferrer">http://technet.microsoft.com/en-us/library/cc738483.aspx</a> for details. However, c000000d is STATUS_INVALID_PARAMETER; the technet article talks primarily about status c0000005 or c0000409 (access violation/DEP)</p>\n'}, {'answer_id': 223855, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': '<p>Java and IE7 do not like to play together nicely.  Just turn off DEP, it will work fine then.</p>\n\n<p><a href="http://www.tech-recipes.com/rx/1261/vista_disable_dep_noexecute_protection_fix_explorer_crashing/" rel="nofollow noreferrer">http://www.tech-recipes.com/rx/1261/vista_disable_dep_noexecute_protection_fix_explorer_crashing/</a></p>\n'}, {'answer_id': 351405, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 1, 'selected': False, 'text': '<p>go to internet explorer options/ advanced /security/ uncheck the box that says enable memory protection to mitigate attacks this will work it did for me</p>\n\n<p>go to internet explorer options/ advanced /security/ uncheck the box that says enable memory protection to mitigate attacks this will work it did for me</p>\n'}, {'answer_id': 1055956, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>Most likely there is an addon that is messing with IE.</p>\n\n<p>You can try this.\n1.      Open IE\n2.      Switch to the Advanced tab.\n3.      Click the Reset Internet Explorer Settings button.\n4.      Click Reset to confirm the operation.\n5.      Click Close when the resetting process finished.\n6.      Uncheck Enable third-party browser extensions option in the Settings box.\n7.      Click Apply, click OK.</p>\n\n<p>After this, check to see if it works and if it does, enable one addon at a time until you find the culprit. Then uninstall it and reinstall it if you need it.</p>\n'}, {'answer_id': 1698970, 'author': 'chris', 'author_id': 206566, 'author_profile': 'https://Stackoverflow.com/users/206566', 'pm_score': 0, 'selected': False, 'text': '<p>just try disabling the bing or msn toolbar - should do the trick.  </p>\n'}]
['https://Stackoverflow.com/questions/51700', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5363/']