"Thomas Lee" <tfl@psp.co.uk> wrote in message
news:mKgF6DRjyJ8FFArR@mail.psp.co.uk...
> In message <222FDFD3-E735-4B99-9A53-E31E67D4F0B3@microsoft.com>,
> "/\\/\\o\\/\\/ [MVP]" <mow001@hotmail.NoSpam> writes
>>PoSH> $c = [drawing.color]'red'
>>PoSH> "{0:x}" -f $c.ToArgb()
>>ffff0000
>>
>>;-)
>
>
> Thanks VERY much.
>
> BTW: where is this format documented? http://msdn2.microsoft.com/en-us/lib...or.toargb.aspx
>
> The calling seqence is a bit off, I sort of expected
> "{0:x} in hex`n{1} in decimal" -f $c.ToArgb() $c.ToArgb()
>
> To work. But it generated an error, whereas:
>
> I was sort of surprised to find this worked:
> PSH [D:\foo]: "{0:x} in hex`n{1} in decimal" -f $c.ToArgb(),$c.ToArgb()
> ffff0000 in hex
> -65536 in decimal
>
> I expected the paramaters to the right of '-f' to be space, not comma
> delimited.
Yeah I've been bit by that before. I just had to wire it into my memory
that -f expects an array arguments.
--
Keith