Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2314

Funtionen mit Referenz Parametern

$
0
0

Hi,

langsam verzweifle ich. Eigentlich sollte dieses Script 2 mal eine 5 auswerfen.

Weiß jemand was daran falsch ist und wie es korrekt geht ?

[string]$Global = ''


function TestRefFunction([ref]$Param)
{
    [string]$Param = '5'
    $Param | Out-Default
}

TestRefFunction([ref]$Global)

$Global | Out-Default

Gruß Frank



Viewing all articles
Browse latest Browse all 2314


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>