PrepAway - Latest Free Exam Questions & Answers

Choose the call method which will do this.

You work as the application developer at Domain.com.
You are creating a class library which must be able to access system environment variables.
You must set a call method which will only force a runtime SecurityException if the callers which are higher in the call stack, fail to have the required permissions.
Choose the call method which will do this.

PrepAway - Latest Free Exam Questions & Answers

A.
Demand()

B.
Assert()

C.
PermitOnly()

D.
Deny()

Explanation:
Demand forces all callers in the call stack to have the specified permission. PermitOnly will instruct the runtime to reduce the access by only allowing callers with the permissions explicitly stated and nothing else.
Assert will ignore the permissions of callers and allow them indiscriminately. Deny will explicitly deny access if the caller has the specified permission.


Leave a Reply