Click here to Skip to main content
15,890,882 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
JokeI woke up this morning as a cat... Pin
Peter_in_278029-May-21 16:42
professionalPeter_in_278029-May-21 16:42 
GeneralIoWhat now? Pin
Kent Sharkey29-May-21 15:22
staffKent Sharkey29-May-21 15:22 
GeneralRe: IoWhat now? Pin
Greg Utas29-May-21 15:35
professionalGreg Utas29-May-21 15:35 
GeneralRe: IoWhat now? Pin
Mike Hankey29-May-21 15:51
mveMike Hankey29-May-21 15:51 
GeneralRe: IoWhat now? Pin
Kornfeld Eliyahu Peter29-May-21 19:30
professionalKornfeld Eliyahu Peter29-May-21 19:30 
GeneralRe: IoWhat now? Pin
Daniel Pfeffer29-May-21 19:40
professionalDaniel Pfeffer29-May-21 19:40 
GeneralRe: IoWhat now? Pin
Joe Woodbury30-May-21 9:41
professionalJoe Woodbury30-May-21 9:41 
Generalwhat i learned the hard way today ... Pin
BillWoodruff29-May-21 9:55
professionalBillWoodruff29-May-21 9:55 
BinarySerializer is a very useful tool, with much less "ceremony" (annotations) required than DataContract. It does have its own brutal ways: it will serialize private Fields.

The fact my WinForm app created an instance of another project (generic 'ctor) separate from the Form, and then called its internally defined Serialize/Deserialize methods ... that in turn used BinarySerializer ...

Well I didn't expect it to break trying to serialize with an error saying the Form must be marked as Serializable: after all, a WinForm is a Control, and you can't serialize Controls.

I went back over every part of the code: external Class project has parameterless 'ctor: check.

There were some properties of Type Action in the external project that had code injected into them at run-time in the Form Load event: I recalled that BinarySerializer ignored Properties being said somewhen by Marc Gravell.

After much gnashing of teeth, I finally let go of fantasizing that some new Framework version had screwed things up, and, went in and added [NonSerializable] attributes on the Action Property definitions.

Whoops: that's illegal: with BinarySerializer, that Attribute works only on Fields. Changed Actions to Fields, and voila, things save and restore as expected.

And now, I'm going to go outside and cry, because I have proven to myself, again, that my tendency toward certainty is my relentless enemy, and I burn with shame.
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali

GeneralRe: what i learned the hard way today ... Pin
honey the codewitch30-May-21 1:32
mvahoney the codewitch30-May-21 1:32 
GeneralRe: what i learned the hard way today ... Pin
BillWoodruff30-May-21 9:30
professionalBillWoodruff30-May-21 9:30 
GeneralRe: what i learned the hard way today ... Pin
Richard Deeming31-May-21 22:42
mveRichard Deeming31-May-21 22:42 
GeneralRe: what i learned the hard way today ... Pin
BillWoodruff1-Jun-21 1:03
professionalBillWoodruff1-Jun-21 1:03 
GeneralNew version of Chrome... Pin
OriginalGriff29-May-21 9:25
mveOriginalGriff29-May-21 9:25 
GeneralRe: New version of Chrome... Pin
Nelek30-May-21 1:09
protectorNelek30-May-21 1:09 
QuestionWhat's the most challenging algorithm you've ever faced Pin
honey the codewitch29-May-21 4:25
mvahoney the codewitch29-May-21 4:25 
AnswerRe: What's the most challenging algorithm you've ever faced Pin
PIEBALDconsult29-May-21 4:59
mvePIEBALDconsult29-May-21 4:59 
GeneralRe: What's the most challenging algorithm you've ever faced Pin
honey the codewitch29-May-21 5:10
mvahoney the codewitch29-May-21 5:10 
GeneralRe: What's the most challenging algorithm you've ever faced Pin
Daniel Pfeffer29-May-21 7:19
professionalDaniel Pfeffer29-May-21 7:19 
GeneralRe: What's the most challenging algorithm you've ever faced Pin
davecasdf31-May-21 5:54
davecasdf31-May-21 5:54 
AnswerRe: What's the most challenging algorithm you've ever faced Pin
RickZeeland29-May-21 5:46
mveRickZeeland29-May-21 5:46 
GeneralRe: What's the most challenging algorithm you've ever faced Pin
honey the codewitch29-May-21 6:20
mvahoney the codewitch29-May-21 6:20 
AnswerRe: What's the most challenging algorithm you've ever faced Pin
Daniel Pfeffer29-May-21 7:55
professionalDaniel Pfeffer29-May-21 7:55 
AnswerRe: What's the most challenging algorithm you've ever faced Pin
BillWoodruff29-May-21 9:04
professionalBillWoodruff29-May-21 9:04 
GeneralRe: What's the most challenging algorithm you've ever faced Pin
honey the codewitch29-May-21 9:06
mvahoney the codewitch29-May-21 9:06 
GeneralRe: What's the most challenging algorithm you've ever faced Pin
BillWoodruff29-May-21 10:09
professionalBillWoodruff29-May-21 10:09 

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.