I had one question about how to use the contract, and please let me know if this is not the right place to ask.
Question I have is can the preconditions only go in the constructor? It makes sense to me that this would be the case, but I figued I'd ask just in case. I have a custom attribute where I need to check if a variable object inplements a specific interface,
but the object is passed in a method and not in the constructor.
Mike Barnett - Getting started with Code Contracts in Visual Studio 2008
Feb 24, 2009 at 12:47 PMQuestion I have is can the preconditions only go in the constructor? It makes sense to me that this would be the case, but I figued I'd ask just in case. I have a custom attribute where I need to check if a variable object inplements a specific interface, but the object is passed in a method and not in the constructor.
Thanks,
DoN