Get-StaticMethodDefin by Steven Murawski 35 months ago
View followups from Steven Murawski | embed code: <script type="text/javascript" src="http://PoshCode.org/embed/967"></script>download | new post
Helper function to list the definitions of static methods
- #Steven Murawski
- #http://blog.usepowershell.com
- #03/20/2009
- function Get-StaticMethodDefinition()
- {
- param ($Method, [Type]$Type=$null)
- BEGIN
- {
- if ($Type -ne $null)
- {
- $Type | Get-StaticMethodDefinition $Method
- }
- }
- PROCESS
- {
- if ($_ -ne $null)
- {
- $_ | Get-Member -Name $Method -Static -MemberType Method | ForEach-Object {$_.Definition -replace '\), ', "), `n"}
- }
- }
- }
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.
PowerShell Code Repository