![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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) |
| | PowerShell User Guide - Comparison Operators - error? Is there a mistake in the section that reads as follows? "Comparisons of types that are not the same are based on the right hand side of the operator. The shell will attempt to convert the left hand side of the operator into the type of the right hand side of the operator. " My tests show the current release converts the right hand side to the left hand side. Example: PS D:\> $sb1 = new-object system.text.stringbuilder test PS D:\> $sb1 -eq "test" False PS D:\> "test" -eq $sb1 True -- David K Allen Carlson School of Management University of Minnesota Minneapolis, MN |
My System Specs![]() |
| | #2 (permalink) |
| | Re: PowerShell User Guide - Comparison Operators - error? yep - that's a typo - good catch! jim -- James Truher[MSFT] Program Manager - Windows PowerShell Microsoft Corporation This posting is provided "AS IS" with no warranties, no confers rights. Visit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShell Visit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scr.../hubs/msh.mspx "David K Allen" <David_UMN@newsgroups.nospam> wrote in message news:3BF0C994-ED8F-455C-929F-FAFE397C2FEC@microsoft.com... > Is there a mistake in the section that reads as follows? > "Comparisons of types that are not the same are based on the right hand > side > of the operator. The shell will attempt to convert the left hand side of > the operator into the type of the right hand side of the operator. " > My tests show the current release converts the right hand side to the left > hand side. > Example: > PS D:\> $sb1 = new-object system.text.stringbuilder test > PS D:\> $sb1 -eq "test" > False > PS D:\> "test" -eq $sb1 > True > -- > David K Allen > Carlson School of Management > University of Minnesota > Minneapolis, MN |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Re: Comparison of two AD user queries | VB Script | |||
| Desktop CPU Comparison Guide | Vista News | |||
| Desktop Graphics Card Comparison Guide | Graphic cards | |||
| Powershell Operators | PowerShell | |||
| CTP2 comparison operators | PowerShell | |||