Click here to Skip to main content
15,895,799 members
Home / Discussions / C#
   

C#

 
AnswerRe: please, can any one help me? Pin
Angel Reyes1-Jan-04 7:54
Angel Reyes1-Jan-04 7:54 
Generalrounded form Pin
hebzzz1-Jan-04 3:34
hebzzz1-Jan-04 3:34 
GeneralRe: rounded form Pin
Jacky S1-Jan-04 4:47
Jacky S1-Jan-04 4:47 
Generallike this for the form.... Pin
eggie51-Jan-04 6:26
eggie51-Jan-04 6:26 
QuestionHow to handle storage in C#/.NET Pin
Mohsen Sajjadi1-Jan-04 3:18
Mohsen Sajjadi1-Jan-04 3:18 
AnswerRe: How to handle storage in C#/.NET Pin
Mazdak1-Jan-04 5:31
Mazdak1-Jan-04 5:31 
GeneralRe: How to handle storage in C#/.NET Pin
Mohsen Sajjadi1-Jan-04 20:56
Mohsen Sajjadi1-Jan-04 20:56 
AnswerRe: How to handle storage in C#/.NET Pin
Heath Stewart2-Jan-04 4:41
protectorHeath Stewart2-Jan-04 4:41 
Look into serialization in .NET, either using the System.Runtime.Serialization namespace elements, or the System.Xml.Serialization namespace elements. The first is true serialization and can handle cirucular references, as well as be easily controlled by implementing ISerializable. All that is required to serialize a Type is attribute it with the SerializableAttribute (put [Serializable] on the class definition). See the .NET Framework SDK documentation for more details, or search this site for plenty of examples (or google). If a Type isn't serializable and you can't / don't want to extend it and attribute it / customize serialization, you can use an ISerializationSurrogate to serialization the Type. You can also fix-up data after serialization is completely by having your object implement IDeserializationCallback. You can serializate to XML (SOAP) or binary with the default formatters. More might exist, or you can (though not recommended, especially without knowing the internals of serialization) implement your own formatter.

XML Serialization, in contrast, using simple attributes and serialization to XML the way you define, unlike SOAP serialization above that would be pretty much unreadable to most people. XML serialization is limited however. You're not technically supposed to be able to control it as much, but you can implement the undocumented IXmlSerializable interface to serialization Types without XML Serialization attributes. This can serialize "prettier" documents, but doesn't have near the capabilities (like handling cirucular references).

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralChanging paper size at run time Pin
Yaron K.31-Dec-03 23:06
Yaron K.31-Dec-03 23:06 
GeneralRe: Changing paper size at run time Pin
Heath Stewart2-Jan-04 4:33
protectorHeath Stewart2-Jan-04 4:33 
GeneralRe: Changing paper size at run time Pin
Yaron K.3-Jan-04 19:40
Yaron K.3-Jan-04 19:40 
GeneralCreate a form from a XML Pin
Member 49620031-Dec-03 15:46
Member 49620031-Dec-03 15:46 
GeneralRe: Create a form from a XML Pin
Mazdak31-Dec-03 19:00
Mazdak31-Dec-03 19:00 
GeneralRe: Create a form from a XML Pin
Stephane Rodriguez.31-Dec-03 21:50
Stephane Rodriguez.31-Dec-03 21:50 
Generalcreate a form dynamically from XML Pin
Member 49620031-Dec-03 15:44
Member 49620031-Dec-03 15:44 
GeneralRounding Pin
Anonymous31-Dec-03 7:09
Anonymous31-Dec-03 7:09 
GeneralRe: Rounding Pin
Mazdak31-Dec-03 7:20
Mazdak31-Dec-03 7:20 
GeneralRe: Rounding Pin
Nick Parker31-Dec-03 7:45
protectorNick Parker31-Dec-03 7:45 
GeneralReadline() ignores some characters Pin
Rostrox31-Dec-03 6:47
Rostrox31-Dec-03 6:47 
GeneralRe: Readline() ignores some characters Pin
Mazdak31-Dec-03 7:06
Mazdak31-Dec-03 7:06 
GeneralRe: Readline() ignores some characters Pin
Rostrox31-Dec-03 8:24
Rostrox31-Dec-03 8:24 
GeneralRe: Readline() ignores some characters Pin
Mazdak31-Dec-03 9:59
Mazdak31-Dec-03 9:59 
GeneralBinaryFormatter.Deserialize() Pin
Guinness4Strength31-Dec-03 6:04
Guinness4Strength31-Dec-03 6:04 
GeneralRe: BinaryFormatter.Deserialize() Pin
Tristan Rhodes31-Dec-03 6:29
Tristan Rhodes31-Dec-03 6:29 
GeneralRe: BinaryFormatter.Deserialize() Pin
Guinness4Strength31-Dec-03 6:41
Guinness4Strength31-Dec-03 6:41 

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.