We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Serialization, Deserialization Problem in 4.1. NET 2.0

Thread ID:

Created:

Updated:

Platform:

Replies:

38734 Dec 16,2005 04:07 PM UTC Dec 19,2005 07:58 AM UTC General Discussion 2
loading
Tags: General Discussion
Uwe Wittig
Asked On December 16, 2005 04:07 PM UTC

Hello, the following easy code worked in SF 3.3 and .NET 1.1 and throws an exception in 4.1. CellValueType isn''t stored correctly. If I change the produced xml from to System.String no exception is thrown. void SerializeDeserialize() { GridStyleInfo info = new GridStyleInfo(); info.CellValueType = typeof(string); info.Format = "G"; MemoryStream memStream = new MemoryStream(1000); XmlSerializer serializer = new XmlSerializer(info.Store.GetType()); serializer.Serialize(memStream, info.Store); System.Text.Encoding encoder = System.Text.Encoding.GetEncoding("windows-1252"); string xml = encoder.GetString(memStream.GetBuffer()); memStream = new MemoryStream(encoder.GetBytes(xml)); GridStyleInfo info2 = (GridStyleInfo)serializer.Deserialize(memStream); } Any Ideas? Thanks, Uwe

Uwe Wittig
Replied On December 16, 2005 04:15 PM UTC

Sorry, there are some errors in the previous post: The last line should read: GridStyleInfoStore info2 = (GridStyleInfoStore)serializer.Deserialize(memStream); The XML won''t post correctly, so I try it in text: The CellValueType is empty but should have System.String as content. Thanks, Uwe

Uwe Wittig
Replied On December 19, 2005 07:58 AM UTC

Hello, I posted this twice (one time in the Grid Forum)because the site gave me an error. The post in the Grid forum was answered satisfactorily. Thanks, Uwe

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;