![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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) |
| | string.format() ??? is there a way to get to string.format? I notice when I do a get-member it isn't exposed. |
My System Specs![]() |
| | #2 (permalink) |
| | Re: string.format() ??? Static methods require the '::' operator instead of: PS (52) > [string]::format("Hi {0}", "there") Hi there You may also want to look at the format operator -f which is effectively short-hand for String.Format: PS (53) > "Hello {0}, today is {1}" -f "there",(get-date) Hello there, today is 5/19/2006 10:16:03 PM -bruce -- Bruce Payette [MSFT] Windows PowerShell Technical Lead Microsoft Corporation This posting is provided "AS IS" with no warranties, and confers no rights. "Jeff Jarrell" <jjarrel_NOSPAM@yahoo.com> wrote in message news:uezL1X7eGHA.2172@TK2MSFTNGP04.phx.gbl... > is there a way to get to string.format? > > I notice when I do a get-member it isn't exposed. > |
My System Specs![]() |
| | #3 (permalink) |
| | Re: string.format() ??? thats it, thanks. jeff "Bruce Payette [MSFT]" <brucepay@microsoft.com> wrote in message news:%23Az$3y8eGHA.4828@TK2MSFTNGP05.phx.gbl... > Static methods require the '::' operator instead of: > > PS (52) > [string]::format("Hi {0}", "there") > Hi there > > You may also want to look at the format operator -f which is effectively > short-hand for String.Format: > > PS (53) > "Hello {0}, today is {1}" -f "there",(get-date) > Hello there, today is 5/19/2006 10:16:03 PM > > -bruce > > -- > Bruce Payette [MSFT] > Windows PowerShell Technical Lead > Microsoft Corporation > This posting is provided "AS IS" with no warranties, and confers no > rights. > "Jeff Jarrell" <jjarrel_NOSPAM@yahoo.com> wrote in message > news:uezL1X7eGHA.2172@TK2MSFTNGP04.phx.gbl... >> is there a way to get to string.format? >> >> I notice when I do a get-member it isn't exposed. >> > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| String format strange behaviour | .NET General | |||
| Converting date time format to string format | PowerShell | |||
| Format a string with non printable chars | PowerShell | |||
| RE: Format a string with non printable chars | PowerShell | |||
| ADO and String.Format questions. | PowerShell | |||