Brady Gaster: new FxCop rule - serializable classes need default constructors

In an earlier post, I talked about the different people creating FxCop rules. Brady Gaster, the impetus for that post has created another. Keep 'em coming, Brady!

fxcop rule : serializable classes need default constructors

with a little work and a lot of help from the guys over on the GDN FxCop messageboard, i'm able to publish this next rule. it does something like the one from yesterday, in terms of enforcing one of the most important serialization requirements imposed on us by the framework. here's the deal - like yesterday's rule, the serialization functionality within the framework needs to be able to create objects using a few assumptions. one of these assumptions is that serializable objects will be creatable without any construction parameters. so this rule basically enforces that requirement by ensuring that all objects marked with the Serializable attribute contain default public (instance-only!) constructors.