... Home  
... Impressum
... ColorConsole

... CMD
... Netsh-XP
... Netsh-7
... Netsh-Vista
... Powershell

Download the Windows 7 Starter, Home (Basic Premium), Professional und Ultimate!


... facebook.de
 
 
ColorConsole [Version 1.7.1000] PowerShell 2.0-Export
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.

C:\Windows-7>Powershell get-help about_Ref -full
# TOPIC
about_Ref

# SHORT DESCRIPTION
Describes how to create and use a reference variable type.

# LONG DESCRIPTION
You can use the reference variable type to permit a method to change the
value of a variable that is passed to it.

When the [ref] type is associated with an object, it returns a reference
to that object. If the reference is used with a method, the method can
refer to the object that was passed to it. If the object is changed within
the method, the change appears as a change in the value of the variable
when control returns to the calling method.

To use referencing, the parameter must be a reference variable. If it is
not, an InvalidArgument exception is thrown.

The parameters used in method invocations must match the type required
by the methods.

Examples:

PS> function swap([ref]$a,[ref]$b)
>> {
>> $a.value,$b.value = $b.value,$a.value
>> }

PS> $a = 1
PS> $b = 10
PS> $a,$b
1
10
PS> swap ([ref]$a) ([ref]$b)
PS> $a,$b
10
1

PS C:\ps-test> function double
>> {
>> param ([ref]$x) $x.value = $x.value * 2
>> }

PS C:> $number = 8
PS C:> $number
8
PS C> double ([ref]$number)
PS C> $number
16

The variable must be a reference variable.

PS C:\ps-test> double $number
double : Reference type is expected in argument.
At line:1 char:7
+ double <<<< $number

SEE ALSO
about_Variables
about_Environment_Variables
about_Functions
about_Script_Blocks

C:\Windows>powershell get-help about_regular_expressions -full

OS: Windows-7 / Windows-Vista // Windows Server 2008
»»»» ColorConsole


0.062
Cmd.exe korrekt verlassen, gibt es hier einen Befehl?  / Wie kann ich mit Q-Dir Bilder und Poster drucken?  / Mit Win-7 CDs und DVDs brennen! Geht das?  / Wie kann ich die Reihenfolge der einzelnen PDF-Seiten festlegen  / How to turn off the clicking sound in ms internet explorer?  / Soll ich den Energiesparmodus ausschalten in Windows 7, oder anlassen?  / Win 7 download?  / Leider wird die Anwendungsfreude durch nervige Pop-Ups von meinem Anti-Virenprogramm KIS 9.x getrübt!  / / Lesetipp: 405  / Wie kann ich mit der Win 7 ISO Datei von Vista upgraden?  / Office 2003 installiert, alles funktioniert in Win-7, aber Outlook 2003 nicht?  / Hilfe! Microsoft hat bei Windows 7 die Menüs vergessen?  / Klappt die PDF Vorschau in Windows 7?  / Warum Produktaktivierung bei Windows-7?  / Am Desktop erscheint die Versionsnummer vom Betriebssystem?  /