我有存储在应用程序设置一些项目。 当我这样做
this._userSettings = IsolatedStorageSettings.ApplicationSettings;
我得到一个System.FormatException
。 我如何找出是什么原因造成的,当我读? 我假设的东西是在IsolatedStorage是不应该存在。
这里是堆栈。
at System.Double.Parse(String s, NumberStyles style, IFormatProvider provider)
at System.Xml.XmlConvert.ToDouble(String s)
at System.Xml.XmlReader.ReadContentAsDouble()
at System.Xml.XmlDictionaryReader.XmlWrappedReader.ReadContentAsDouble()
at System.Xml.XmlDictionaryReader.ReadElementContentAsDouble()
at System.Runtime.Serialization.XmlReaderDelegator.ReadElementContentAsDouble()
at System.Reflection.RuntimeMethodInfo.InternalInvoke(RuntimeMethodInfo rtmi, Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess, StackCrawlMark& stackMark)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, StackCrawlMark& stackMark)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at System.Runtime.Serialization.XmlFormatReader.ReadValue(Type type, String name, String ns, XmlObjectSerializerReadContext context, XmlReaderDelegator xmlReader)
at System.Runtime.Serialization.XmlFormatReader.ReadMemberAtMemberIndex(ClassDataContract classContract, Object& objectLocal, DeserializedObject desObj)
at System.Runtime.Serialization.XmlFormatReader.ReadClass(DeserializedObject desObj, ClassDataContract classContract, Int32 membersRead)
at System.Runtime.Serialization.XmlFormatReader.Deserialize(XmlObjectSerializerReadContext context)
at System.Runtime.Serialization.XmlFormatReader.InitializeCallStack(DataContract clContract, XmlReaderDelegator xmlReaderDelegator, XmlObjectSerializerReadContext xmlObjContext, XmlDictionaryString[] memberNamesColl, XmlDictionaryString[] memberNamespacesColl)
at System.Runtime.Serialization.CollectionDataContract.ReadXmlValue(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadDataContractValue(DataContract dataContract, XmlReaderDelegator reader)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, DataContract& dataContract)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, DataContract dataContract, String name, String ns)
at System.Runtime.Serialization.DataContractSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName)
at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName)
at System.Runtime.Serialization.XmlObjectSerializer.ReadObject(XmlDictionaryReader reader)
at System.Runtime.Serialization.XmlObjectSerializer.ReadObject(Stream stream)
at System.IO.IsolatedStorage.IsolatedStorageSettings.Reload()
at System.IO.IsolatedStorage.IsolatedStorageSettings..ctor(Boolean useSiteSettings)
at System.IO.IsolatedStorage.IsolatedStorageSettings.get_ApplicationSettings()
at ShowSeek.Custom_Classes.StateManager.SetupState()
at ShowSeek.App.Application_Activated(Object sender, ActivatedEventArgs e)
at Microsoft.Phone.Shell.PhoneApplicationService.FireActivated(Boolean isExecutionContextPreserved)
at Microsoft.Phone.Execution.NativeEmInterop.FireOnResume(Boolean isExecutionContextPreserved)