Wizard
Wizard

Reputation: 22103

How could retrieve all the methods of System.Math

I try to retrieve all the methods of the [System.Math] class as: enter image description here

but it just report error:

PS C:\Users\me> get-member -name [math]
get-member : You must specify an object for the Get-Member cmdlet.
At line:1 char:1

alternatively tried:

PS C:\Users\me> [math].GetMethods() | Select Name, IsStatic -Unique

Name          IsStatic
----          --------
Ceiling           True
Floor             True
Round             True
Truncate          True
IEEERemainder     True
Abs               True

How could get a detailed list of all the methods as the above image?

Upvotes: 0

Views: 92

Answers (1)

Mathias R. Jessen
Mathias R. Jessen

Reputation: 174660

Use Get-Member -Static to retrieve static members:

[math] |Get-Member -Static
# or
Get-Member -InputObject $([math]) -Static

Upvotes: 1

Related Questions