Question:You are loading a new assembly into an application. You need to override the default evidence for the assembly. You require the common language runtime (CLR) to grant the assembly a permission set, as if the assembly were loaded from the local intranet zone. You need to build the evidence collection. Which code segment should you use? 

A Evidence= evidence = gcnew Evidence();
evidence->AddHost(gcnew Zone(SecurityZone::Intranet)); 

B Evidence= evidence = gcnew Evidence();
evidence->AddAssembly(gcnew Zone(SecurityZone::Intranet)); 

C Evidence= evidence = gcnew Evidence(Assembly::GetExecutingAssembly()->Evidence); 

D Evidence= evidence = gcnew Evidence(AppDomain::CurrentDomain->Evidence); 

+ Answer
+ Report
Total Preview: 588

Copyright © 2024. Powered by Intellect Software Ltd