This implementation makes heavy use of the FormatterServices object used by serialization: http://msdn.microsoft.com/en-us/library/system.runtime.serialization.formatterservices_members.aspx It provides several helpful methods in this case that are aware of custom serialization options like [NonSerialized]. In the case of an object not being marked [Serializable] you have to create field list manually. Here is an example shallow object clone: using [...]

 

Sorry to misappropriate my blog for a moment but I had to post this. Hi, my name is Roger and I’ve been video game free for 8 years. In that time I’ve fallen off the wagon a few times; however, they were brief episodes. As a recovering gameaholic this video really strikes home for me. [...]

 
The exponential cost of doing things "Right"

Sometimes a picture is worth a thousand words… I simply ‘cringe’ every time I hear a developer utter the words “I’m going to do this RIGHT!”. Why do we use the words “Right way” and “Wrong way” when describing things? The fact is that there is a lot more than just one “Wrong way” to [...]

 

How to throw the InnerException of a TargetInvocationException without loosing stack details? I’ve been plagued by this problem for some time. There are a few common solutions to this: Option #1 – just leave it alone. The downfall here is that specific types of exceptions cannot be caught easily in calling code. In some instances [...]

 

There are three virtual methods that IMHO should have never been added to System.Object… • ToString() • GetHashCode() • Equals() All of these could have been implemented as an interface. Had they done so I think we’d be much better off. So why are these a problem? First let’s focus on ToString(): 1. If ToString() [...]

 

A good friend of mine who is the definition of a ‘Security Expert’ replied to my recent post regarding the use of current encryption technologies. He had this to say about my assertion that PKI cannot prove my identity: PKI-based authentication can prove who you are, to the extent it can prove that the name [...]

 

An excerpt of a recent slashdot post: “… I wanted to ask the Slashdot community, what do you think the hold up is (regarding use of encryption)? Are the existing protocols somehow not good enough? Are the protocols fine, but not supported well enough in software? Is it too complicated to manage the various encryption [...]

Jan 112010
 

Changed hosting environments, hopefully this will be less painful to all :)

 

My last post reguarding “Deadlocks and other issues with Invoke / BeginInvoke” was something of a rant on the subject of WinForms and multi-threading. I thought I’d post on the useage of the solution that was presented originally on the stackoverflow article. The following defines the interface portion of the class: public class EventHandlerForControl<TEventArgs> where [...]

 

Just ran into this post over on devlicio.us and thought it worth a shout-out. Much like the CommandInterpreter I recently added to the library, it allows you to remove all the parsing of arguments from your code and provides command-line help. Here is to hoping that a full-blown version eventually finds it’s way into the [...]