System.Security.Permissions.HostProtectionPermission.Union C# (CSharp) Method

Union() public method

public Union ( IPermission target ) : IPermission
target IPermission
return IPermission
        public override IPermission Union(IPermission target)
        {
            if (target == null)
                return(this.Copy());
            if(this.GetType() != target.GetType())
                throw new ArgumentException( String.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("Argument_WrongType"), this.GetType().FullName) );
            HostProtectionResource newResources = (HostProtectionResource)((uint)this.m_resources | (uint)((HostProtectionPermission)target).m_resources);
            return new HostProtectionPermission(newResources);
        }