<PackageReference Include="System.Security.Permissions" Version="9.0.6" />

NamedPermissionSet

public sealed class NamedPermissionSet : PermissionSet
Defines a permission set that has a name and description associated with it. This class cannot be inherited.
public string Description { get; set; }

Gets or sets the text description of the current named permission set.

public string Name { get; set; }

Gets or sets the name of the current named permission set.

Initializes a new instance of the NamedPermissionSet class from another named permission set.

public NamedPermissionSet(string name)

Initializes a new, empty instance of the NamedPermissionSet class with the specified name.

public NamedPermissionSet(string name, PermissionState state)

Initializes a new instance of the NamedPermissionSet class with the specified name in either an unrestricted or a fully restricted state.

public NamedPermissionSet(string name, PermissionSet permSet)

Initializes a new instance of the NamedPermissionSet class with the specified name from a permission set.

public NamedPermissionSet Copy(string name)

Creates a copy of the named permission set with a different name but the same permissions.