![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Intellisense / get-member I miss Visual Studio and intellisense at times. I don't miss the overhead though. Is there a way to list a namespace methods, properties withoutdeclaring the variable first? I know the .NET framework pretty well but not memorized everything. Is there a built-in cmdlet to display properties, methods of a particular namespace by typing just a command.. Kind of like Object Browser in Visual Studio. 'These two statements print out the methods and works fine. $sw = new-object system.io.streamwriter("c:\temp\ss.txt") $sw | get-member -membertype methods Is there a way to do and print out methods? get-member System.IO.Streamwriter -memberType methods -- Steve Schofield Windows Server MVP - IIS ASPInsider Member - MCP http://www.orcsweb.com/ Managed Complex Hosting #1 in Service and Support |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Intellisense / get-member "Steve Schofield" <steve@deviq.com> wrote in message news:ewAk9SQQHHA.1000@TK2MSFTNGP05.phx.gbl... <...> > I know the .NET framework pretty well but not memorized everything. Is > there a built-in cmdlet to display properties, methods of a particular > namespace by typing just a command.. Kind of like Object Browser in > Visual Studio. > > 'These two statements print out the methods and works fine. > $sw = new-object system.io.streamwriter("c:\temp\ss.txt") > $sw | get-member -membertype methods > > Is there a way to do and print out methods? > get-member System.IO.Streamwriter -memberType methods It works well for static methods (note the parenthesis and square brackets around the class name): PS> get-member -in ([system.math]) -static TypeName: System.Math Name MemberType Definition ---- ---------- ---------- Abs Method static System.Single Abs(Single value), static Syst... Acos Method static System.Double Acos(Double d) Asin Method static System.Double Asin(Double d) Atan Method static System.Double Atan(Double d) .... If you want to explore properties and methods available to class instances, I think you have to create an instance first. Jacques |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Intellisense / get-member Steve Schofield wrote: > I miss Visual Studio and intellisense at times. I don't miss the overhead > though. Is there a way to list a namespace methods, properties without> declaring the variable first? > > I know the .NET framework pretty well but not memorized everything. Is > there a built-in cmdlet to display properties, methods of a particular > namespace by typing just a command.. Kind of like Object Browser in Visual > Studio. > > 'These two statements print out the methods and works fine. > $sw = new-object system.io.streamwriter("c:\temp\ss.txt") > $sw | get-member -membertype methods > > Is there a way to do and print out methods? > get-member System.IO.Streamwriter -memberType methods You don't need to assign to a variable. You can pipe the new object into the get-member call: new-object text.stringBuilder | get-member -memberType methods If you don't want to create an instance at all, you can use reflection: [text.stringBuilder].getMethods() | % { $_.name } | sort -unique |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Add-Member not Adding a member | PowerShell | |||
| Build My Own Intellisense | .NET General | |||
| Configuration of Intellisense. | .NET General | |||
| Visual Studio Intellisense | PowerShell | |||