What are code contracts?



What are code contracts?..

Answer / Jyoti Sinha

Code Contracts is a programming discipline and set of tools for defining, verifying, and enforcing specific conditions at runtime in the Microsoft .NET Framework applications. These conditions can include preconditions (checking that a method's parameters are valid), postconditions (checking the result of a method), object invariants (checking an object's state), and threads invariants (checking thread safety).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Dot Net General Interview Questions

Difference between Panel and GroupBox classes?

3 Answers  


What is the use of system.diagnostics.process class in .net?

1 Answers  


What is an assembly? What are the different types of assemblies?

1 Answers  


How will u load dynamic assembly? How will create assemblies at run time?

1 Answers  


What do the terms “boxing” and “unboxing” mean?

1 Answers  


what is machine key error in .NET how can we solve it?

1 Answers  


What's singleton activation mode in .net?

1 Answers  


Name some of the languages .NET support?

3 Answers  


How is .net core cross platform?

1 Answers  


What is equivalent for regsvr32 exe in .net ?

1 Answers  


Can we use data reader to bind gridview?

3 Answers   TCS,


How anonymous method is different from a lambda expression?

1 Answers  


Categories