[Precondition("o != null")]
[Postcondition("size > 0")]
void AddObject(Object o) {
   // ... do stuff ...
   return;
}

Which would then at compile time insert

void AddObject(Object o) {
   Check.Require(o != null);
   // ... do stuf ...
   Check.Ensure(size > 0);
   return;
}

a problem may be that the text in the precondition etc. would need special IDE support for IntelliSense etc.
if it was in the code block instead of being a string it would be better maybe


-----
George Birbilis ([EMAIL PROTECTED])
http://www.kagi.com/birbilis
--------------


_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to