Click here to Skip to main content
15,909,651 members
Home / Discussions / C#
   

C#

 
GeneralRe: ICloneable class with strings Pin
WorkOnlineClick2Wealth8-May-16 6:07
WorkOnlineClick2Wealth8-May-16 6:07 
GeneralRe: ICloneable class with strings Pin
Richard Deeming9-May-16 1:50
mveRichard Deeming9-May-16 1:50 
AnswerRe: ICloneable class with strings Pin
DaveAuld8-May-16 5:37
professionalDaveAuld8-May-16 5:37 
GeneralRe: ICloneable class with strings Pin
WorkOnlineClick2Wealth8-May-16 5:46
WorkOnlineClick2Wealth8-May-16 5:46 
QuestionC# chart library with interactive elements drawing Pin
WallaceCheshire7-May-16 3:41
WallaceCheshire7-May-16 3:41 
AnswerRe: C# chart library with interactive elements drawing Pin
Ravi Bhavnani7-May-16 18:30
professionalRavi Bhavnani7-May-16 18:30 
AnswerRe: C# chart library with interactive elements drawing Pin
Kenneth Haugland7-May-16 18:31
mvaKenneth Haugland7-May-16 18:31 
QuestionWinForms issues: (partial rant, partial sharing, totally a request for opinions, comments) Pin
BillWoodruff7-May-16 2:21
professionalBillWoodruff7-May-16 2:21 
May I remind you, gentle reader, that this forum was once a place for open-ended discussions of C# language issues ?

I'm working on something I intend to publish on CP. Wanting to make sure it works using FrameWork 4.0 I am:

1. using a Microsoft supplied weirdness that runs using the Microsoft.Win32 library: [^]. I've slightly modified this to set a global static flag if version 4.0 or greater of the FrameWork is available.

2. using an ingenious hack by Thomas Levesque that enables the various special Property Attributes, like 'CallerMemberName to work in 4.0: [^].

Wanting to make sure I can serialize data that includes Controls that may be inside any ContainerControl on any Form (and, which may have identical Names inside said different hosts), I am working around DataContract's (and all other serializers I know of except one) limitation of not being able to serialize WinForms Controls. So, I do a dance of transforming a bunch of static data into a Dictionary that represents a Control as List of strings of the form:

outmostcontainername ... container#n name ... controlname

And, after serialization I can resurrect these back into the appropriate object instances.

So yeah, I can serialize and de-serialize, paying a penalty to save Control references in this way, and then resurrect them back to instances at run-time.

And, now ... Rant Begin

1. what bs that MS no longer makes Environment.Version return different values for FrameWork 4.0 and 4.5 !

2. what a pain in the butt to have to use a work-around to get CallerMemberName usable in 4.0. Yeah, I know, I shouldn't complain about about that: after all, it was announced as new "feature" with 4.5, and the fact that T. Levesque got it working is ... well, our good fortune.

3. not being able to serialize Control instances without the kind of dance I do here is annoying. while, as I said, there is one serializer that seems to be able to do it (here on CodeProject), I feel I can't rely on it. Reference on request, and, no, it's not Mehdi Gholam's serializer.

4. using the DataContract/DataMember serializer is certainly so much easier, for me, than the previous critters from MS, and JSON, etc. however, it seems "sensitive" to unknown context issues, and will, at times, fail with no obvious reason.

The work-around I've found is to (any, or all, of these):

a. clear any saved file the serializer may point at before invoking the serializer

b. re-compile all the various pieces of the app, and then close, and restart, Visual Studio 2013.

5. I also encounter the problem of a compile somehow not synching non-UI Projects with the UI main project: yep, I've set the "DependsOn" setting in the UI main project to the non-ui Class Library. I usually discover this when I set a break-point somewhere in the Class Library, and it doesn't get hit ... which cues me I need to re-compile the Class Library.

... Rant End

Now that's off my chest: I can say, honestly, that these are great tools to work with that I could never have imagined even twenty years ago being available to a "mere mortal" like me Smile | :) These issues I rave about are, viewed in the larger frame, just pimples on paradise's angels.

However, lest I sound too fan-boiish, let me say that MSDN documentation, and its implementation in the Help system for Visual Studio, and on-line, is a fetter, a snare, a pustulous canker, a travesty, a daily water-boarding for those who use it, etc.

Your thoughts, reactions, comments, corrections ?
«There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008

AnswerRe: WinForms issues: (partial rant, partial sharing, totally a request for opinions, comments) Pin
CHill607-May-16 4:45
mveCHill607-May-16 4:45 
QuestionWhat does Bitmap.LockBits() do? Pin
Bernhard Hiller5-May-16 21:04
Bernhard Hiller5-May-16 21:04 
AnswerRe: What does Bitmap.LockBits() do? PinPopular
OriginalGriff5-May-16 21:54
mveOriginalGriff5-May-16 21:54 
GeneralRe: What does Bitmap.LockBits() do? Pin
Bernhard Hiller5-May-16 23:22
Bernhard Hiller5-May-16 23:22 
GeneralRe: What does Bitmap.LockBits() do? Pin
OriginalGriff5-May-16 23:45
mveOriginalGriff5-May-16 23:45 
GeneralRe: What does Bitmap.LockBits() do? Pin
Rob Philpott6-May-16 5:49
Rob Philpott6-May-16 5:49 
GeneralRe: What does Bitmap.LockBits() do? Pin
OriginalGriff6-May-16 6:12
mveOriginalGriff6-May-16 6:12 
Questionenvt Pin
Member 125041034-May-16 23:52
Member 125041034-May-16 23:52 
AnswerRe: envt Pin
Eddy Vluggen5-May-16 0:06
professionalEddy Vluggen5-May-16 0:06 
AnswerRe: envt Pin
Pete O'Hanlon5-May-16 0:08
mvePete O'Hanlon5-May-16 0:08 
AnswerRe: envt Pin
Richard MacCutchan5-May-16 0:28
mveRichard MacCutchan5-May-16 0:28 
AnswerRe: envt Pin
Sascha Lefèvre5-May-16 0:44
professionalSascha Lefèvre5-May-16 0:44 
AnswerRe: envt Pin
Patrice T5-May-16 0:54
mvePatrice T5-May-16 0:54 
AnswerRe: envt Pin
koolprasad20035-May-16 18:58
professionalkoolprasad20035-May-16 18:58 
Questionc# Pin
Member 125041034-May-16 22:03
Member 125041034-May-16 22:03 
AnswerRe: c# Pin
Richard MacCutchan4-May-16 22:56
mveRichard MacCutchan4-May-16 22:56 
QuestionRe: c# Pin
Member 122800337-May-16 4:42
Member 122800337-May-16 4:42 

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.