// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
using System.Globalization;
using System.IO;
}
}
+ internal object Reset ()
+ {
+ propertyValue = GetDeserializedDefaultValue ();
+ dirty = true;
+ defaulted = true;
+ needPropertyValue = true;
+ return propertyValue;
+ }
+
private object GetDeserializedDefaultValue ()
{
if (property.DefaultValue == null)
- if (property.PropertyType.IsValueType)
+ if (property.PropertyType != null && property.PropertyType.IsValueType)
return Activator.CreateInstance (property.PropertyType);
else
return null;
try {
switch (property.SerializeAs) {
case SettingsSerializeAs.String:
- if (serializedValue is string && ((string) serializedValue).Length > 0)
+ if (serializedValue is string)
deserializedObject = TypeDescriptor.GetConverter (property.PropertyType).ConvertFromInvariantString ((string) serializedValue);
break;
#if (XML_DEP)
}
-#endif