public override IPermission Intersect(IPermission target) {
if (target == null) {
return null;
}
if (target.GetType() != typeof(ConfigurationPermission)) {
throw ExceptionUtil.ParameterInvalid("target");
}
// Create an None permission if either this or other is None
if (_permissionState == PermissionState.None) {
return new ConfigurationPermission(PermissionState.None);
}
else {
ConfigurationPermission other = (ConfigurationPermission) target;
return new ConfigurationPermission(other._permissionState);
}
}