if (-not ([string]::IsNullOrEmpty($version)))
{
$request += "https://stackoverflow.com/" + $version
}
You can also use ! as an alternative to -not.
if (-not ([string]::IsNullOrEmpty($version)))
{
$request += "https://stackoverflow.com/" + $version
}
You can also use ! as an alternative to -not.