Microsoft Exam Questions

What should you do?

You are writing an installation application for a Windows Forms application.
The Windows Forms application requires a private message queue named MyQueue.
You need to ensure that the message queue exists after installation.

What should you do?

A.
Add an Installer class to the Windows Forms application project.
Write the following code in the AfterInstall event for the Installer class.
MessageQueue q = new MessageQueue(@”.\Private$\MyQueue”);

B.
Add an Installer class to the Windows Forms application project.
Write the following code in the AfterInstall event for the Installer class.
Queue q = new Queue();
q.Enqueue(@”.\Private$\MyQueue”);

C.
Add an Installer class to the Windows Forms application project.
Write the following code in the AfterInstall event for the Installer class.
Queue<Message> q = new Queue<Message>();
q.Enqueue(new Message(@”.\Private$\MyQueue”));

D.
Add an Installer class to the Windows Forms application project.
Write the following code in the AfterInstall event for the Installer class.
MessageQueue q = MessageQueue.Create(@”.\Private$\MyQueue”);