Which code segment should you use?

You need to write a code segment that will create a common language runtime (CLR) unit of isolation within an application.
Which code segment should you use?

You need to write a code segment that will create a common language runtime (CLR) unit of isolation within an application.
Which code segment should you use?

A.
AppDomainSetup mySetup = AppDomain.CurrentDomain.SetupInformation;
mySetup.ShadowCopyFiles = “true”;

B.
System.Diagnostics.Process myProcess;
myProcess = new System.Diagnostics.Process();

C.
AppDomain domain;
domain = AppDomain.CreateDomain(“CertKillerDomain”);

D.
System.ComponentModel.Component my Component;
myComponent = new System.ComponentModel.Component();

Explanation:
Create a new ApplicationDomain using the AppDomain.CreateDomain() method.
A ShadowCopyFiles property of AppDomainSetup controls whether shadow copying is enabled or disabled.
B the Process class is used to represent an existing process running on a computer.
D The ComponentModel.Component class is used for sharing components between applications.



Leave a Reply 1

Your email address will not be published. Required fields are marked *


mr_tienvu

mr_tienvu

Correct answer is C