IAC 2024 - IA Fast Track to Search Focused AI Solutions
Introduction to Spec#
1. Proof that your software works Presentation created for Spec# v1.0.20411 as released on 11 April 2008
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58. From Visual Studio, right-click Properties on the project, then Configuration Properties, and set ReferenceTypesAreNonNullByDefault to true Without /nn /nn Possibly-null T T T? Non-null T T! T
59. public class Foo : Bar { private T _t; public Foo() { _t = new T(); } public override void DoSometing() { _t.Do(); } } Bar b = new Foo();
60. public class Foo : Bar { private T _t; public Foo() { _t = new T(); } public override void DoSometing() { _t.Do(); } } Bar b = new Foo(); Hint! Hint!
61. public class Foo : Bar { private T _t; public Foo() : base() { _t = new T(); } public override void DoSometing() { _t.Do(); } } Bar b = new Foo(); public abstract class Bar { public Bar() { DoSomething(); } public abstract void DoSomething(); }