Answers for "powershell add-type if not exists"

0

powershell add-type if not exists

if (-not ([System.Management.Automation.PSTypeName]'MyClass').Type)
{
    Add-Type -TypeDefinition 'public class MyClass { }'
}
Posted by: Guest on August-19-2021

Code answers related to "powershell add-type if not exists"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language