You don’t actually have a class yet, just a definition of a class.
You’re actually just piping your class definition to Get-Member and the output you’re seeing is the members of an instance of the System.RuntimeType class.
If you create a custom constructor, consider adding a parameterless constructor to create instance with no arguments.
You can use the static modifier for properties/methods that aren’t instance specific. The GetPeriod() method is a bad example but just for reference.
Thank you very much for the answers. It works. Creating an actual instance let’s the method show up in Get-Member. I hadn’t even thought of that. It had assumed that Get-Member checks the definition, the recipe so to say.
I still wonder: When I pipe for example [DateTime] to Get-Member:
[DateTime] | Get-Member
ist shows me the methods of [DateTime]. When I do the same with [MyClass] it shows me quite a few methods as well just not the method GetPeriod that I had created in the class. Does someone have any idea why that is?