Are there any defensive programming libraries (like Code contract , assert libraries for c# .Net开发者_高级运维 2.0).
You mean other than Code Contracts itself? What's wrong with it?
Because code contracts supports .NET 2.0... or so I guess from this comment on the FAQ:
If you are not using it (for instance, you are using .NET 2.0 or 3.5), then you are using the implementation of the contract class supplied in the assembly Microsoft.Contracts.dll and Debug.Assert is called with an appropriate string specifying what kind of failure was encountered
精彩评论