<?xml version="1.0" encoding="UTF-8"?> <Address xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <FirstName>4</FirstName> <FamilyName>4</FamilyName> <UserLevel>عاد?</UserLevel> <Password>4</Password> </Address> Addresses =(AddressBook) SerializableData.Load(DataFileName,typeof(AddressBook)); """"""""""DataFileName is AddressBook.xml"""""""" public static Object Load(Stream stream, Type newType) { // create a serializer and load the object.... XmlSerializer serializer = new XmlSerializer(newType); Object newObject = serializer.Deserialize(stream); // return the new object... return newObject; }
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)\r\n<br /> at System.Xml.Serialization.XmlSerializer.Deserialize(Stream stream)\r\n<br /> at AddressBook.Module.SerializableData.Load(Stream stream, Type newType) in C:\\ExCs\\ExCs\\Classes\\SerializableData.cs:line 38\r\n<br /> at AddressBook.Module.SerializableData.Load(String filename, Type newType) in C:\\ExCs\\ExCs\\Classes\\SerializableData.cs:line 28\r\n<br /> at ExCs.UserManager.UserManager_Load_1(Object sender, EventArgs e) in C:\\ExCs\\ExCs\\Modules\\UserManager.cs:line 214\r\n<br /> at System.Windows.Forms.UserControl.OnLoad(EventArgs e)\r\n<br /> at System.Windows.Forms.UserControl.OnCreateControl()\r\n<br /> at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)\r\n<br /> at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)\r\n<br /> at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)\r\n<br /> at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)\r\n<br /> at System.Windows.Forms.Control.CreateControl()\r\n at System.Windows.Forms.Control.WmShowWindow(Message& m)\r\n at System.Windows.Forms.Control.WndProc(Message& m)\r\n at System.Windows.Forms.ScrollableControl.WndProc(Message& m)\r\n<br /> at System.Windows.Forms.ContainerControl.WndProc(Message& m)\r\n<br /> at System.Windows.Forms.Form.WmShowWindow(Message& m)\r\n at System.Windows.Forms.Form.WndProc(Message& m)\r\n at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)\r\n<br /> at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)\r\n<br /> at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)\r\n<br /> at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)\r\n<br /> at System.Windows.Forms.Control.SetVisibleCore(Boolean value)\r\n<br /> at System.Windows.Forms.Form.SetVisibleCore(Boolean value)\r\n<br /> at System.Windows.Forms.Control.set_Visible(Boolean value)\r\n<br /> at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)\r\n at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)\r\n at System.Windows.Forms.Application.Run(Form mainForm)\r\n<br /> at ExCs.Program.Main() in C:\\ExCs\\ExCs\\Classes\\Program.cs:line 18\r\n<br /> at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)\r\n<br /> at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)\r\n<br /> at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()\r\n<br /> at System.Threading.ThreadHelper.ThreadStart_Context(Object state)\r\n<br /> at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n<br /> at System.Threading.ThreadHelper.ThreadStart()"
Addresses =(AddressBook) SerializableData.Load(DataFileName,typeof(AddressBook));
AddressBook
Address
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)