Someone on the PowerShell NG asked recently if there was some kind of equivalent to c#'s "using namespace;" or VB.NET's "Imports namespace" statements. Well, the short answer to that is no, not really. However, you can simulate it by creating functions for each static method on the class:
Save this as "import.ps1" for example and use like so:
PS > . .\import.ps1 ([Math])...
PS > Sin 10.841470984807897
Methods that take multiple args must have them passed as a single array:
PS > Max @(1,2)2Have fun!
Update: there are some interesting extensions appearing based around my initial post on microsoft.public.windows.powershell.
Page rendered at Thursday, September 02, 2010 5:29:10 PM (Eastern Daylight Time, UTC-04:00)