diff --git a/ConvertTo-Base64GUIExample/ConvertTo-Base64GUIExample.ps1 b/ConvertTo-Base64GUIExample/ConvertTo-Base64GUIExample.ps1 index 4d31b4a..5ba59b7 100644 --- a/ConvertTo-Base64GUIExample/ConvertTo-Base64GUIExample.ps1 +++ b/ConvertTo-Base64GUIExample/ConvertTo-Base64GUIExample.ps1 @@ -13,10 +13,14 @@ param( [string] $GUIType = 'VB' ) - if ('VB' -eq $GUIType) { - [System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic') | Out-Null - [Microsoft.VisualBasic.Interaction]::InputBox("Let's convert this to base64", $Title, $null) | ForEach-Object { - [Microsoft.VisualBasic.Interaction]::MsgBox([convert]::ToBase64String([char[]]$_),0,$Title) + switch ($GUIType) { + 'VB' { + [System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic') | Out-Null + [Microsoft.VisualBasic.Interaction]::InputBox("Let's convert this to base64", $Title, $null) | ForEach-Object { + [Microsoft.VisualBasic.Interaction]::MsgBox([convert]::ToBase64String([char[]]$_),0,$Title) + } + } + default { } } } \ No newline at end of file