SecurityException.Demanded Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the demanded security permission, permission set, or permission set collection that failed.
public:
property System::Object ^ Demanded { System::Object ^ get(); void set(System::Object ^ value); };
public object? Demanded { get; set; }
public object Demanded { get; set; }
[System.Runtime.InteropServices.ComVisible(false)]
public object Demanded { get; set; }
member this.Demanded : obj with get, set
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.Demanded : obj with get, set
Public Property Demanded As Object
A permission, permission set, or permission set collection object.
- Attributes
The following code example shows the use of the Demanded property to display the demanded security permission, permission set, or permission set collection that failed. This code example is part of a larger example provided for the SecurityException class.
Display("The demanded permission is: {0}",
exception->Demanded);
Display("The demanded permission is: " +
sE.Demanded.ToString());
Display("The demanded permission is: " & sE.Demanded.ToString())
In the case of a returned permission set or permission set collection, the returned object contains all the demanded permissions, one or more of which caused the failure.
.NET feedback
.NET is an open source project. Select a link to provide feedback: