Click here to Skip to main content
15,916,379 members
Home / Discussions / C#
   

C#

 
AnswerRe: Garbage Collector Pin
Colin Angus Mackay11-Jan-07 4:42
Colin Angus Mackay11-Jan-07 4:42 
AnswerRe: Garbage Collector Pin
Dave Kreskowiak11-Jan-07 4:44
mveDave Kreskowiak11-Jan-07 4:44 
QuestionWhen is [Serializable] enough ? Pin
MarkPhB11-Jan-07 0:28
MarkPhB11-Jan-07 0:28 
AnswerRe: When is [Serializable] enough ? Pin
J4amieC11-Jan-07 0:44
J4amieC11-Jan-07 0:44 
GeneralRe: When is [Serializable] enough ? Pin
MarkPhB11-Jan-07 1:14
MarkPhB11-Jan-07 1:14 
GeneralRe: When is [Serializable] enough ? Pin
Bekjong11-Jan-07 1:26
Bekjong11-Jan-07 1:26 
GeneralRe: When is [Serializable] enough ? Pin
MarkPhB11-Jan-07 2:26
MarkPhB11-Jan-07 2:26 
GeneralRe: When is [Serializable] enough ? Pin
Bekjong11-Jan-07 2:59
Bekjong11-Jan-07 2:59 
Marking your class [Serializable()] is only enough if all of your class members are themselves serializable: The exception you're getting is because one of your members doesn't support serialization.

If you don't really need the member just mark it as [field:NonSerialized()] and the exception will go away.

Otherwise, make sure it supports serialization. You can do this by marking the class as [Serializable()] itself. Determine which members should be saved, mark all others as [field:NonSerialized()], repeat the operation for your member's memberclasses (and enumerations), and so on, until you reach a class with only primitive types.

This mechanism provides an easier, faster and less errorprown way to serialize, I prefer it over ISerialzable...



Standards are great! Everybody should have one!

QuestionToolStripProgressBar/Progressbar Pin
GunaChinna11-Jan-07 0:17
GunaChinna11-Jan-07 0:17 
AnswerRe: ToolStripProgressBar/Progressbar Pin
Stefan Troschuetz11-Jan-07 1:08
Stefan Troschuetz11-Jan-07 1:08 
QuestionDatagridview Pin
GunaChinna11-Jan-07 0:04
GunaChinna11-Jan-07 0:04 
AnswerRe: Datagridview Pin
Riaan Booyzen11-Jan-07 1:00
Riaan Booyzen11-Jan-07 1:00 
AnswerRe: Datagridview Pin
il_masacratore11-Jan-07 2:01
il_masacratore11-Jan-07 2:01 
Questionconsole application Pin
diya_dev10-Jan-07 23:51
diya_dev10-Jan-07 23:51 
AnswerRe: console application Pin
Guffa10-Jan-07 23:59
Guffa10-Jan-07 23:59 
AnswerRe: console application Pin
ednrgc11-Jan-07 2:22
ednrgc11-Jan-07 2:22 
AnswerRe: console application Pin
M. A. Deniz Yalman11-Jan-07 2:34
M. A. Deniz Yalman11-Jan-07 2:34 
QuestionClickOnceArticle-thank u Pin
illusionarylife10-Jan-07 23:38
illusionarylife10-Jan-07 23:38 
GeneralRe: ClickOnceArticle-thank u Pin
Guffa10-Jan-07 23:44
Guffa10-Jan-07 23:44 
AnswerRe: ClickOnceArticle-thank u Pin
Pete O'Hanlon11-Jan-07 0:07
mvePete O'Hanlon11-Jan-07 0:07 
Questiononly test Pin
okzss10-Jan-07 23:38
okzss10-Jan-07 23:38 
AnswerRe: only test Pin
okzss10-Jan-07 23:39
okzss10-Jan-07 23:39 
GeneralRe: only test Pin
Colin Angus Mackay10-Jan-07 23:42
Colin Angus Mackay10-Jan-07 23:42 
AnswerRe: only test Pin
ednrgc11-Jan-07 2:23
ednrgc11-Jan-07 2:23 
AnswerRe: only test Pin
Dave Kreskowiak11-Jan-07 4:25
mveDave Kreskowiak11-Jan-07 4:25 

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.