PowerShell Fonksiyonlari Icindeki Gelismis Parametreler – 4 – AllowEmptyString Ozelligi

Bir parametre degerinin bos string olarak atanabilmesine izin verir.

function test2 {
Param(
    [Parameter(Mandatory)]
    [string]
    $isim
)
write-host $isim
}

function test2 {
    Param(
        [Parameter(Mandatory)]
        [AllowEmptyString()]
        [string]
        $isim
    )
    
    write-host $isim
}