Skip to content

Commit 8509d4e

Browse files
committed
even more colorizer tests
1 parent 34470d1 commit 8509d4e

42 files changed

Lines changed: 27035 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// from https://msdn.microsoft.com/en-us/library/dd233160.aspx
2+
3+
// The declaration creates a constructor that takes two values, name and age.
4+
type Person(name:string, age:int) =
5+
let mutable internalAge = age
6+
7+
new(name:string) = Person(name, 0)
8+
9+
member this.Name = name
10+
// A read/write property.
11+
member this.Age
12+
with get() = internalAge
13+
and set(value) = internalAge <- value
14+
15+
member this.HasABirthday () = internalAge <- internalAge + 1
16+
member this.IsOfAge targetAge = internalAge >= targetAge
17+
override this.ToString () =
18+
"Name: " + name + "\n" + "Age: " + (string)internalAge

0 commit comments

Comments
 (0)