1

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.

RedGazelle
  • 47
  • 1
  • 8
  • 1
    You 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
  • 1
    This 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

0 Answers0