Constructor overloading

suggest change
class Person {
    [string] $Name
    [int] $Age

    Person([string] $Name) {
        $this.Name = $Name
    }

    Person([string] $Name, [int]$Age) {
        $this.Name = $Name
        $this.Age = $Age
    }
}

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents