You create a logging utility class by using Microsoft Visual Studio .NET 2008 and the .NET Framework 3.5. The class writes logs to event log services.
You need to ensure that the client applications that use the class can create an instance of the class only if they have permissions to write to the event log services. What should you do?
A.
Use role-based security in a class constructor.
B.
Use role-based security declaratively on the class.
C.
Use code access security declaratively on the class.
D.
Use the AllowPartiallyTrustedCallersAttribute attribute on the assembly.