Finding Methods with Specific Keywords

by Oct 29, 2010

As such, .NET Framework is huge and full of stars, and it is not easy to discover interesting methods buried inside of it. You can use the next lines to find all methods with a given keyword:

$key = 'Kill'
[System.Diagnostics.Process].Assembly.GetExportedTypes() | Where-Object { $_.isPublic}
| Where-Object { $_.isClass } | Where-Object { @($_.GetMethods() | Where-Object {
$_.Name -like "*$key*" }).Count -gt 0 } | Select-Object -expandProperty FullName

Twitter This Tip!
ReTweet this Tip!