PowerShell 2.0 CTP: How to find static members

Software

This one stumped me for a minute – how do you find static members of a given type? Get-Member by default only shows the instance members.

The trick is to use the flag -static with Get-Member, to tell PowerShell that you want only static members.

Example:

[Convert] | gm -static

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Furl
  • Ma.gnolia
  • Reddit
  • TwitThis
No Comments

Leave a Reply

Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">