Click here to Skip to main content
15,891,033 members
Home / Discussions / C#
   

C#

 
Questionpublically readonly but internally writable objects? Pin
student_rhr22-Apr-09 7:43
student_rhr22-Apr-09 7:43 
AnswerRe: publically readonly but internally writable objects? Pin
harold aptroot22-Apr-09 7:49
harold aptroot22-Apr-09 7:49 
AnswerRe: publically readonly but internally writable objects? Pin
Thomas Weller22-Apr-09 8:33
Thomas Weller22-Apr-09 8:33 
AnswerRe: publically readonly but internally writable objects? Pin
0x3c022-Apr-09 8:36
0x3c022-Apr-09 8:36 
QuestionSerialization and ViewState Pin
Fayu22-Apr-09 7:11
Fayu22-Apr-09 7:11 
AnswerRe: Serialization and ViewState Pin
Fayu22-Apr-09 7:25
Fayu22-Apr-09 7:25 
GeneralRe: Serialization and ViewState Pin
OriginalGriff22-Apr-09 9:17
mveOriginalGriff22-Apr-09 9:17 
GeneralRe: Serialization and ViewState Pin
Fayu22-Apr-09 9:33
Fayu22-Apr-09 9:33 
Thanks for your reply.

Currently I am receiving an Xml which I an deserializing into a custom class. This custom class contains the [Serializable] attribute and also implements the ISerializable interface (probably extra work i did not need to do). The properties of this class contains the [XmlElement] and [XmlAttribute] attributes. Does this mean that this class can only be serialized/deserialized using the XmlSerializer only?

When I attempt to serialize/deserialize using the BinaryFormatter, I get the following error:
Type 'System.Xml.XmlNode' in Assembly 'System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable. 

I also get this error when trying to set the ViewState item value to the object.

I get the feeling that the binarySerializer is trying to serialize an object that is already xmlserialized...

Is it possible for me to use mutlitple types of serializers on a single object?
GeneralRe: Serialization and ViewState Pin
OriginalGriff22-Apr-09 21:43
mveOriginalGriff22-Apr-09 21:43 
QuestionJust for fun - how slow are exceptions? Pin
Rob Philpott22-Apr-09 6:12
Rob Philpott22-Apr-09 6:12 
AnswerRe: Just for fun - how slow are exceptions? Pin
Eddy Vluggen22-Apr-09 6:24
professionalEddy Vluggen22-Apr-09 6:24 
GeneralRe: Just for fun - how slow are exceptions? Pin
Rob Philpott22-Apr-09 6:38
Rob Philpott22-Apr-09 6:38 
GeneralRe: Just for fun - how slow are exceptions? Pin
Eddy Vluggen22-Apr-09 6:45
professionalEddy Vluggen22-Apr-09 6:45 
GeneralRe: Just for fun - how slow are exceptions? Pin
Luc Pattyn22-Apr-09 6:46
sitebuilderLuc Pattyn22-Apr-09 6:46 
GeneralRe: Just for fun - how slow are exceptions? Pin
Rob Philpott22-Apr-09 6:50
Rob Philpott22-Apr-09 6:50 
GeneralRe: Just for fun - how slow are exceptions? Pin
Luc Pattyn22-Apr-09 6:54
sitebuilderLuc Pattyn22-Apr-09 6:54 
AnswerRe: Just for fun - how slow are exceptions? Pin
Luc Pattyn22-Apr-09 6:31
sitebuilderLuc Pattyn22-Apr-09 6:31 
GeneralRe: Just for fun - how slow are exceptions? Pin
Rob Philpott22-Apr-09 6:33
Rob Philpott22-Apr-09 6:33 
GeneralRe: Just for fun - how slow are exceptions? Pin
Rob Philpott22-Apr-09 6:41
Rob Philpott22-Apr-09 6:41 
GeneralRe: Just for fun - how slow are exceptions? Pin
Skymir23-Apr-09 2:58
Skymir23-Apr-09 2:58 
AnswerRe: Just for fun - how slow are exceptions? Pin
Colin Angus Mackay22-Apr-09 6:36
Colin Angus Mackay22-Apr-09 6:36 
GeneralRe: Just for fun - how slow are exceptions? Pin
Rob Philpott22-Apr-09 6:38
Rob Philpott22-Apr-09 6:38 
GeneralRe: Just for fun - how slow are exceptions? Pin
Luc Pattyn22-Apr-09 6:42
sitebuilderLuc Pattyn22-Apr-09 6:42 
GeneralRe: Just for fun - how slow are exceptions? Pin
Rob Philpott22-Apr-09 6:51
Rob Philpott22-Apr-09 6:51 
QuestionSQL SCRIPT Pin
kibromg22-Apr-09 4:43
kibromg22-Apr-09 4:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.