Is it possible to create property accessors and mutators (Get() and Set()) in powershell V5 classes? "about_Classes" shows how to create them for the class itself, but not the classes properties.
Asked
Active
Viewed 261 times
1
-
1You could define a class and then use that as the property type inside another class, but you wouldn't achieve much, as you can't mark fields private inside a PowerShell class – Mathias R. Jessen Dec 20 '15 at 16:32
-
1This question has an answer [here](https://stackoverflow.com/questions/39717230/powershell-class-implement-get-set-property/40365941#40365941). – alx9r Mar 01 '17 at 18:17