I'm learning the syntax for classes in PowerShell 5. One thing I haven't figured out is how to handle inherited classes whose base class has a constructor.
Let's suppose I have the following class:
class computer { [int] $MemorySize [int] $DiskSize computer([int] $mem, [int] $disk) { $this.MemorySize = $mem $this.DiskSize = $disk } }
Now suppose I want to create a subclass called "laptop" that adds a ScreenSize paramter. How do I write the constructor?
class laptop : computer { [int] $ScreenSize laptop(?????