-2

I have a simple question about Code Contracts in C#.

What is the main purpose of Code Contacts in C# ? So that I can use them in my application ?

Are they supported in .Net Core 3.0 any more ?

Is it considered to be old fashioned approach ?

kakha
  • 115
  • 2
  • 8
  • This is too broad and opinon-based for SO - the first questions can be answered by an internet search and the last one is a matter of opinion. – Rufus L May 02 '19 at 18:18
  • Yeap, I was just wondering what was the best possible place for Code Contracts to be used in modern applications :) – kakha May 02 '19 at 18:28

1 Answers1

3
  1. You can find most of the information you are asking here .
  2. They are supported in Net Core (3.0 Preview 3 2.2 2.1 2.0 1.1 1.0) and .Net Framework (4.8 4.7.2 4.7.1 4.7 4.6.2 4.6.1 4.6 4.5.2 4.5.1 4.5 4.0)'
  3. As to whether it is old fashion, that is a matter of opinion. They are still used but with the popularity of automated testing not as much.
Edney Holder
  • 1,140
  • 8
  • 22
  • Thank you for replying, I guess u are right :) automated testing made Code Contracts be used less than previous years – kakha May 02 '19 at 18:01