ADO dot NET Question NIIT (151-200)

ADO dot NET Question NIIT (151-200)

151 "Anthony is working as an application developer in Infosol corp. He is asked to create a Windows-based application that should allow the users to print the content they have typed in the textbox. The application should invoke the default Print dialog box by instantiating the PrintDialog class. He writes the following code to accomplish the task.
...........
............
using System.Drawing.Printing;
namespace Print
{
    public partial class Form1 : Form
    {
        PrintDialog pdlg = new PrintDialog();
        internal PrintDocument PDocument = new PrintDocument();
        public Form1()
        {
            InitializeComponent();
        }
        private void Print_Click(object sender, EventArgs e)
        {
            pdlg.Document = PDocument;
            DialogResult result = pdlg.ShowDialog();
            if (result == DialogResult.OK)
                PDocument.Print();
        }
        private void PDocument_PrintPage(object sender,System.Drawing.Printing.PrintPageEventArgs e)
        {
            Graphics.DrawString(textBox1.Text, new Font(""Arial"", 40, FontStyle.Bold), Brushes.Black, 150, 125);
        } }}

The preceding code gives an error when compiled. Identify the line of code causes the error."
1, Graphics.DrawString(textBox1.Text, new Font("Arial", 40, FontStyle.Bold), Brushes.Black, 150, 125);
2, pdlg.Document = PDocument;
3, internal PrintDocument PDocument = new PrintDocument();
4, PrintDialog pdlg = new PrintDialog();

1
152 "John is working as an application developer in BestRetails Corp. He was asked to create an application that should provide a detailed report of the sales made over a period of time. He created the application using crystal reports to generate the required report. To generate a report the 
application should connect to a database that is shared by other applications running in the organization. When the application was executed to generate the report, the records were not displayed in the tables present in the report. Identify the possible error that John could have made."
1, He used the Pull Model method for generating reports.
2, There is an error in the code he wrote for the Pull Model method.
3, There is an error in the code written for populating datasets in the Push Model method.
4, He used the Push Model method for generating reports.

3
153 "John is working as an application developer in InfoSol Inc. He is asked to develop a Windows-based application that should show the date in different formats according to the settings available on the systems in different countries. He writes the following code in his application:
.....
........
DateTime MyDateTime = DateTime.Parse(System.DateTime.Now);
DateLabel.Text = (MyDateTime.ToString(""d""));

However, the preceding code gives the compile time error. Identify the correct reason for error."
"1, The MyDateTime object is not declared correctly. It should be declared as:
DateTime MyDateTime = new DateTime();"
2, Error in the parameter passed to the ToString() method. It should not have any parameter passed to it.
3, Error in the parameter passed to the Parse() method. The parameter should have used ToString() method to convert the date into string.
4, Wrong method called by the DateTime class. The ToString() method should have been used.

3
154 Anthony is an application developer in InfoNet Inc. He is asked to create a Windows-based application for BestRetails Inc. BestRetails Inc., is a leading retail organization that has its business spread in four countries, France, Japan, Spain, and US. He needs to create the common application that should automatically load the appropriate version of the interface according to the existing culture settings on different systems in different countries. He creates the application that runs perfectly. However, in Japan the application displays the default interface of US. Identify the reason for this anomaly.
1, The Language property of the Form is set to French.
2, The Language property of the Form is set to Spanish.
3, The Language property of the Form is set to English (United States).
4, The resource file for Japan culture is not created.

4
155 "Anthony is an application developer in InfoGain Inc. He is asked update an existing Windows-based application without recompiling it. To update the application, he needs to create a resource-only assembly. He performs the following steps to create the resource-only assembly:
1. Create a new VC# project with the Empty Project template.
2. In Solution Explorer, right-click the project and choose Properties. The Property pages open.
3. In the Output Type drop-down menu, change the output type of the project to Class Library. This will cause the assembly to be compiled as a .dll 
file.
4. From the Build menu, choose Build <project> where <project> is the name of the project. The resources you added to the project, are compiled into the assembly.
However, he is not able to accomplish the desired task. Identify the mistake he has made."

1, He should have made the resource assembly as an .exe file.
2, He has not added the resource files to the existing VC# application that needs to be updated
3, He has not selected the Windows Forms Application template.
4, He has not added the resource  files to the new VC# project by choosing Add Existing Item  from the Project menu.

4
156 You are creating an MDI application that supports more than one instances of a child form. You need to write a code snippet to get an instance of the child form that has the focus or that is most recently active. Identify the correct code snippet that you need to write in your application code.
1, Form activeChildForm = this.ActiveMdiChild();
"2, Form activeChildForm = new Form();this.ActiveMdiChild;"
3, Form activeChildForm = ActiveMdiChild;
4, Form activeChildForm = this.ActiveMdiChild;

4
157 You are creating a Windows-based application that accesses the printer. Your application should have restricted access to the printer. Which of the following printing permission levels allows printing only from a more-restricted dialog box?
1, SafePrinting 2, NoPrinting 3, DefaultPrinting 4, AllPrinting

1
158 You are creating a Windows-based application that is using the CrystalReportViewer control to display the groups into which the Crystal Reports is divided. Which of the following components of the CrystalReportViewer control you will use to accomplish the desired task?
1, Main Report Window 2, Export Report 3, Toggle Group Tree 4, Group Tree

4
159 You are asked to create a Windows-based application that should be able to retrieve the image resources from an assembly at run time by using the ResourceManager class. Which of the following methods of the ResourceManager class you need to use to retrieve images from the assembly?
1, Load() 2, GetType() 3, GetObject() 4, GetString()

3
160 You are asked to create a help system by using the HTML Help Workshop (hhw.exe) tool, which is a help-authoring tool. In which of the following files you will put the text that will appear on each page in the help system?
1, HTML Files             2, Graphics and Multimedia Files
3, Help Project Files          4, Contents Files

1
161 You are working as a developer in InfoSol Inc. You are asked to create an application that allow the user to load the picture available on the machine on which the application is running. The application should allow the user to enter the path, where the picture is located, in the textbox. You need to use the asynchronous method to create your application. Identify the correct code that you need to add to your application.
"1, private void pictureBox1_LoadCompleted(object sender, AsyncCompletedEventArgs e)
        {
            if (e.Error != null)
            {
                MessageBox.Show(e.Error.Message);
            }
            else if (e.Cancelled)
            {
                MessageBox.Show(""Load cancelled"");
            }
            else
            {
                MessageBox.Show(""Load completed"");
            }
        }

        private void btnLoadPicture_Click(object sender, EventArgs e)
        {
            pictureBox1.Load(textBox1.Text.ToString());
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            pictureBox1.CancelAsync();
        }

        private void btnExit_Click(object sender, EventArgs e)
        {
            this.Close();
        }"
"2, private void pictureBox1_LoadCompleted(object sender, AsyncCompletedEventArgs e)
        {
            if (e.Error != null)
            {
                MessageBox.Show(e.Error.Message);
            }
            else if (e.Cancelled)
            {
                MessageBox.Show(""Load cancelled"");
            }
            else
            {
                MessageBox.Show(""Load completed"");

            }
        }

        private void btnLoadPicture_Click(object sender, EventArgs e)
        {
            pictureBox1.AddAsync(textBox1.Text.ToString());
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            pictureBox1.CancelAsync();
        }

        private void btnExit_Click(object sender, EventArgs e)
        {
            this.Close();
        }"
"3, private void pictureBox1_LoadCompleted(object sender, AsyncCompletedEventArgs e)
        {
            if (e.Error != null)
            {
                MessageBox.Show(e.Error.Message);
            }
            else if (e.Cancelled)
            {
                MessageBox.Show(""Load cancelled"");
            }
            else
            {
                MessageBox.Show(""Load completed"");
            }
        }

        private void btnLoadPicture_Click(object sender, EventArgs e)
        {
            pictureBox1.LoadAsync();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            pictureBox1.CancelAsync();
        }

        private void btnExit_Click(object sender, EventArgs e)
        {
            this.Close();
        }"
"4, private void pictureBox1_LoadCompleted(object sender, AsyncCompletedEventArgs e)
        {
            if (e.Error != null)
            {
                MessageBox.Show(e.Error.Message);
            }
            else if (e.Cancelled)
            {
                MessageBox.Show(""Load cancelled"");
            }
            else
            {
                MessageBox.Show(""Load completed"");
            }
        }

        private void btnLoadPicture_Click(object sender, EventArgs e)
        {
            pictureBox1.LoadAsync(textBox1.Text.ToString());
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            pictureBox1.CancelAsync();
        }

        private void btnExit_Click(object sender, EventArgs e)
        {
            this.Close();
        }"

4
162 You are working as a developer in InfoSol Inc. You are asked to create a Windows-based application that should implement the concept of asynchronous programming. For such application, the Event Handlers must be assigned to the DoWork and the RunWorkerCompleted events. To do so, you need to identify the correct code snippet to be added to the constructor of the class in the application.
"1, backgroundWorker1.DoWork += new DoWorkEventHandler(backgroundWorker1_DoWork);
this.backgroundWorker1.RunWorkerCompleted += new RunWorkerCompletedEventHandler();"

"2, backgroundWorker1.DoWork += new DoWorkEventHandler();
this.backgroundWorker1.RunWorkerCompleted += new RunWorkerCompletedEventHandler();"

"3, backgroundWorker1.DoWork = new DoWorkEventHandler(backgroundWorker1_DoWork);
this.backgroundWorker1.RunWorkerCompleted = new RunWorkerCompletedEventHandler(backgroundWorker1_RunWorkerCompleted);"

"4, backgroundWorker1.DoWork += new DoWorkEventHandler(backgroundWorker1_DoWork);
this.backgroundWorker1.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backgroundWorker1_RunWorkerCompleted);"

4
163 "You are working as a developer in InfoSol Corp. Your team a created an application for a grocery store. The application must validate the customers who are regular members of the grocery store. The regular customers are issued the membership cards that bear their name and card number. You are asked to create an application that should validate the customer's name and card number before allowing them to avail the discounts. The interface of your application must have the validate button. Your application must have reference to the validation component created by your team. 
Identify the code snippet that you need to add to the click event of the validate button."
"1, CardValidator Validator = new CardValidator();
Validator.CardNumber = TextCard.Text;
Validator.CustomerName = TextCustName.Text;
Validator.Validate();
if (Validator.Validate() == true)
MessageBox.Show(""Valid card Number"");
ifValidator.Validate() == false)
MessageBox.Show(""Invalid Card Number"");"

"2, CardValidator Validator = new CardValidator();
Validator.CardNumber = TextCard.Text;
Validator.CustomerName = TextCustName.Text;
if (Validator.Validate() == true)
MessageBox.Show(""Valid card Number"");
else
MessageBox.Show(""Invalid Card Number"");"

"3, CardValidator Validator = new CardValidator();
Validator.CardNumber = TextCard.Text;
Validator.CustomerName = TextCustName.Text;
Validator.Validate();
if (Validator.Validate() == true)
MessageBox.Show(""Valid card Number"");
else
MessageBox.Show(""Invalid Card Number"");"

"4, CardValidator Validator = new CardValidator();
CardNumber = TextCard.Text;
CustomerName = TextCustName.Text;
Validator.Validate();
if (Validator.Validate() == true)
MessageBox.Show(""Valid card Number"");
else
MessageBox.Show(""Invalid Card Number"");"

3
164 You are working as a developer in Infosol corp. You are asked to create a Windows-based application for a university which is conducting an entrance exam. The application must validate the age of the students before accepting their forms. The age of the students should not be less than 18 and more than 21. For that you need to create a class named Student and use Get and Set methods to validate the age. Identify the code snippet that you need to use.
"1, class Student
{
private int age;
public int StudentAge
{
get
{
return(age);
}
set
{
if ((value > 17) && (value < 22))
age = value;
else
MessageBox.Show(""Age should be between 18 years and 21 years"");
}}}"

"2, class Student
{
private int age;
public int StudentAge()
{
get
{
return(age);
}
set
{
if ((value > 17) && (value < 22))
age = value;
else
MessageBox.Show(""Age should be between 18 years and 21 years"");
}}}"

"3, class Student
{
public int age;
public int StudentAge
{
get
{
return(age);
}
set
{
if ((value > 17) && (value < 22))
age = value;
else{
MessageBox.Show(""Age should be between 18 years and 21 years"");
}}}"

"4, class Student
{
private int age;
public int StudentAge()
{
get()
{
return(age);
}
set()
{
if ((value > 17) && (value < 22))
age = value;
else
MessageBox.Show(""Age should be between 18 years and 21 years"");
}}}"

1
165 You are working as an application developer in Infosol Corp. You are asked to create an application whose interface must have a Calendar control. The Toolbox window of the Visual Studio IDE does not show the Calendar control. So you decide to add the Calendar control to the Toolbox window by selecting it from the Choose Toolbox Items dialog box. After the Calendar control is added to the Toolbox window, you can drag it to the form present in your application. When you add the Calendar control to the application, there are two assemblies that are automatically created and added to your application. Identify those assemblies.
1, AxInterop.MSACAL and MSACAL 2, stdole and System
3, MSACAL and stdole 4, AxInterop.MSACAL and stdole

1
166 Which of the following statements you need to write in your Windows application code to use the Form class?
1, System.Windows.Form.Form 2, System.Windows.Form.Forms
3, System.Windows.Forms.Form 4, System.Windows.Forms.Forms

3
167 __________ are loaded and executed within the process space of the host application.
1, In-process components 2, Out-of-process components
3, Public constructors        4, Internal constructors

1
168 ______________ can be used in a component if you want to use it only inside the component class.
1, Copy constructors 2, Public constructors
3, Internal constructors 4, Private constructors

4
169 When the ___________ method is called, the application will continue to run without interruption until the MethodNameCompleted event is raised.
1, MethodNameAsync() 2, WaitForExit()
3, RunWorkerAsync() 4, CancelAsync()

1
170 Which of the following classes, of the System.Threading namespace, limits the number of threads that can access a resource or pool of resources concurrently?
1, Semaphore class 2, ThreadPool class
3, ReaderWriterLock class 4, Monitor class
1
171 You are asked to create an Out-of-process component that should enable the communication between an application and a database. Which of the following component types you will create?
1, Nonvisual component 2, Visual component
3, In-process component 4, AdRotator component

1
172 You are asked to create a .NET component that should have constructor to allow the developers to create instances of the component. Which of the following types of the constructor you need to create?
1, Internal constructors 2, Public constructors
3, Private constructors 4, Protected constructors

2
173 You are asked to create a composite control for a Windows-based application. Which of the following classes you need to use to inherit for creating the composite control?
1, System.Windows.Forms.UserControl
2, System.Windows.Forms.Button
3, System.Windows.Forms.Control
4, System.Windows.Forms.TextBox

1
174 You are asked to create a Windows-based application that is implementing multiple threading by using the System.Threading namespace. You need to control the access to objects by granting a lock for an object to a single thread. Which of the following classes of the System.Threading namespace you need to use in your application?
1, Monitor class 2, ThreadPool class 3, Mutex class 4, Semaphore class

1
175 You are asked to create an application that should allow simultaneous execution of multiple tasks by using the various methods and events of the  BackgroundWorker component. Which of the following methods you need to use to accomplish the desired task?
1, Worker() 2, CancelAsync() 3, RunWorkerAsync() 4, Dispose()

3
176 "Anthony is working as a developer in InfoSol Corp. He is asked to add a file type to the deployment project. He decides to perform the following steps:
1. Select the File Types on Target Machine node in the File Types editor.
2. Select Action-->Add File Type to add a new file type. Type the name of the document type in the name text box.
3. Select the newly created file type to associate extensions with the file type, Press the F4 key to open the Properties window. 
4. Select the Extensions property and specify the file extensions to be associated with the file type.
5. Select the Command property in the Properties window to associate the file type with an executable file. The Select Item in Project dialog box opens
6. Select the executable file to be associated with the file type.
However, his manager informs him that the preceding steps will not give the desired results. Do you agree?"

1, No. The steps given are correct.
2, Yes. The step 6 shouldbe performed before step 4.
3, Yes. Step 3 should be performed before step 2.
4, Step 4 should be performed before step 2.

1
177 "John is creating a deployment project. He is asked to search a specific file on the target machine by using the Launch Conditions editor. He decides to perform the following steps:
1. Select the Requirements on Target Machine node in the Launch Conditions editor.
2. Select Action-->Add File Launch Condition.
3. Click the Search for File node, and press the F4 key to switch to the Properties window.
4. Select the FileName property in the Properties window, and type the name of the file, which you want to search on the target computer.
5. Select the Folder property, and specify the folders where the search for the file should start.
6. Click the Condition node to display a customized error message, in case the file does not exist.
7. Press the F4 key to view the properties for the Condition node. In the Message property, type the error message to be displayed if the file does not 
exist on the target computer.

However, his manager informs him that the preceding steps are not correct. Do you agree?" 1, No. The given steps are correct.
2, Yes. The step 5 should come before the step 3.
3, Yes. The step 6 should come before the step 3.
4, Yes. The step 3 should come before the step 2.

1
178 "John is working as a developer in Infosol Corp. He is asked to modify the application settings in the application configuration file to change the way the application runs. He is asked to change the URL where the assembly is stored. He decides to change the attribute of the <codeBase> element. 
However, his manager tells him that he is not required to make any changes in the <codeBase> element. Do you agree?"
1, Yes. He should change the oldVersion attribute of the <bindingRedirect> element.
2, Yes. He should change the privatePath attribute of the <probing> element.
3, Yes. He should change the apply attribute of the <publisherPolicy> element.
4, No. John is right. He needs to change the href attribute of the <codeBase> element.

4
179 "John is working as a developer in Infosol Inc. He is asked to create an application that should implement the role-based security. He uses the Windows Principal to implement the Windows-based security. He writes the following code snippet in the application:
................
WindowsIdentity wId = WindowsIdentity.GetCurrent();
WindowsPrincipal = wPr.WindowsPrincipal(wId);
...............

He gets the compile time error. Help him by providing the correct code snippet."
"1, WindowsIdentity wId =  new WindowsIdentity();
WindowsPrincipal wPr = new WindowsPrincipal(wId);"
"2, WindowsIdentity wId;WindowsPrincipal wPr = new WindowsPrincipal(wId);"
"3, WindowsIdentity wId =WindowsIdentity.GetCurrent();WindowsPrincipal wPr;"
"4, WindowsIdentity wId = WindowsIdentity.GetCurrent();
WindowsPrincipal wPr = new WindowsPrincipal(wId);"

4
180 You are working as a developer in InfoGain Inc. Your manager has asked you to create a Windows-based application which should have the custom settings provided by the configuration file. The application should be able to access at run time. You are asked to create two custom settings 'setting1' and 'setting2'. Identify the correct code snippet that you need to add to the configuration file of the application.
"1, <configuration>
<configSections>
<section name=""mySection"" type=""System.Configuration.SingleTagSectionHandler""/>
<mySection setting1=""a"" setting2=""b"" />
</configSections>
</configuration>"
"2, <configuration>
<configSections>
<section name=""mySection"" type=""System.Configuration.SingleTagSectionHandler""/>
<mySection setting1=""a"" setting2=""b"" />
</configuration>
</configSections>"
"3, <configuration>
<section name=""mySection"" type=""System.Configuration.SingleTagSectionHandler""/>
<configSections>
</configSections>
<mySection setting1=""a"" setting2=""b"" />
</configuration>"
"4, <configuration>
<configSections>
<section name=""mySection"" type=""System.Configuration.SingleTagSectionHandler""/>
</configSections>
<mySection setting1=""a"" setting2=""b"" />
</configuration>"

4
181 You are working as a developer in Infogain Corp. You are asked to create an application that uses a specified version of the assembly, which is 1.0.0.0, at run time. However, the application needs to be redirected to run against a newer version, which is 2.0.0.0, of the assembly. In addition, the garbage collection should run concurrently on the same thread as that of the application. You need to make the necessary changes in the configuration file to accomplish the desired task. Identify the code snippet that you need to add to the configuration file.
"1, <configuration>
<runtime>
<gcConcurrent enabled=""true""/>
</runtime>
<assemblyBinding xmlns=""urn:schemas-microsoft-com:asm.v1"">
<dependentAssembly>
<assemblyIdentity name=""myAssembly"" publicKeyToken=""32ab4ba45e0a69a1"" culture=""neutral"" />
<bindingRedirect oldVersion=""1.0.0.0"" newVersion=""2.0.0.0""/>
</dependentAssembly>
</assemblyBinding>
</configuration>"
"2, <configuration>
<runtime>
<assemblyBinding xmlns=""urn:schemas-microsoft-com:asm.v1"">
<dependentAssembly>
<gcConcurrent enabled=""true""/>
<assemblyIdentity name=""myAssembly"" publicKeyToken=""32ab4ba45e0a69a1"" culture=""neutral"" />
<bindingRedirect oldVersion=""1.0.0.0"" newVersion=""2.0.0.0""/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>"
"3, <configuration>
<runtime>
<gcConcurrent enabled=""true""/>
<assemblyBinding xmlns=""urn:schemas-microsoft-com:asm.v1"">
<assemblyIdentity name=""myAssembly"" publicKeyToken=""32ab4ba45e0a69a1"" culture=""neutral"" />
<bindingRedirect oldVersion=""1.0.0.0"" newVersion=""2.0.0.0""/>
</assemblyBinding>
</runtime>
</configuration>"
"4, <configuration>
<runtime>
<gcConcurrent enabled=""true""/>
<assemblyBinding xmlns=""urn:schemas-microsoft-com:asm.v1"">
<dependentAssembly>
<assemblyIdentity name=""myAssembly"" publicKeyToken=""32ab4ba45e0a69a1"" culture=""neutral"" />
<bindingRedirect oldVersion=""1.0.0.0"" newVersion=""2.0.0.0""/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>"

4
182 You are working as a developer in Infogain Corp. You are asked to create an application that should have implemented the Windows Installer launch condition. Identify the correct steps that you need to perform to add a Windows Installer launch condition.
"1, 1. Select the Requirements on Target Machine node in the Launch Conditions editor.
2. Select Action-->Add Windows Installer Launch Condition.
3. Click the Search for Component node, and press the F4 key to switch to the Properties window.
4. Select the ComponentID property, and type the ID of the component to be searched on the target computer.
5. Select the Condition node corresponding to the Search for Component node.
6. Press the F4 key to open the Properties window.
7. Type the error message in the Message property, to be displayed if the component does not exist on the target computer."

"2,
 1. Select the Requirements on Target Machine node in the Launch Conditions editor.
2. Press the F4 key to open the Properties window.
3. Select Action-->Add Windows Installer Launch Condition.
4. Click the Search for Component node, and press the F4 key to switch to the Properties window.
5. Select the ComponentID property, and type the ID of the component to be searched on the target computer.
6. Select the Condition node corresponding to the Search for Component node.
7. Type the error message in the Message property, to be displayed if the component does not exist on the target computer."

"3, 
1. Select the Requirements on Target Machine node in the Launch Conditions editor.
2. Select Action-->Add Windows Installer Launch Condition.
3. Select the ComponentID property, and type the ID of the component to be searched on the target computer.
4. Select the Condition node corresponding to the Search for Component node.
5. Press the F4 key to open the Properties window.
6. Click the Search for Component node, and press the F4 key to switch to the Properties window.
7. Type the error message in the Message property, to be displayed if the component does not exist on the target computer."

"4, 
1. Select Action-->Add Windows Installer Launch Condition.
2. Select the Requirements on Target Machine node in the Launch Conditions editor.
3. Click the Search for Component node, and press the F4 key to switch to the Properties window.
4. Select the ComponentID property, and type the ID of the component to be searched on the target computer.
5. Select the Condition node corresponding to the Search for Component node.
6. Press the F4 key to open the Properties window.
7. Type the error message in the Message property, to be displayed if the component does not exist on the target computer."

1
183 You are working as a developer in InfoSol Inc. You are asked to create a deployment project that should include the File Types Editor to enable the users to add or remove files. Identify the steps that you need to perform to include the file type to the deployment project.
"1,
 1. Select the File Types on Target Machine node in the File Types editor.
2. Select Action-->Add File Type to add a new file type. Type the name of the document type in the name text box.
3. Select the newly created file type to associate extensions with the file type, Press the F4 key to open the Properties window. 
4. Select the Extensions property and specify the file extensions to be associated with the file type.
5. Select the Command property in the Properties window to associate the file type with an executable file. The Select Item in Project dialog box opens.
6. Select the executable file to be associated with the file type."
"2,
 1. Select Action-->Add File Type to add a new file type. Type the name of the document type in the name text box.
2. Select the File Types on Target Machine node in the File Types editor.
3. Select the newly created file type to associate extensions with the file type, Press the F4 key to open the Properties window. 
4. Select the Extensions property and specify the file extensions to be associated with the file type.
5. Select the Command property in the Properties window to associate the file type with an executable file. The Select Item in Project dialog box opens.
6. Select the executable file to be associated with the file type."
"3,
1. Select the File Types on Target Machine node in the File Types editor.
2. Select Action-->Add File Type to add a new file type. Type the name of the document type in the name text box.
3. Select the executable file to be associated with the file type.
4. Select the newly created file type to associate extensions with the file type, Press the F4 key to open the Properties window. 
5. Select the Extensions property and specify the file extensions to be associated with the file type.
6. Select the Command property in the Properties window to associate the file type with an executable file. The Select Item in Project dialog box opens."
"4,
1. Select the File Types on Target Machine node in the File Types editor.
2. Select the newly created file type to associate extensions with the file type, Press the F4 key to open the Properties window.
3. Select Action-->Add File Type to add a new file type. Type the name of the document type in the name text box.
4. Select the Extensions property and specify the file extensions to be associated with the file type.
5. Select the Command property in the Properties window to associate the file type with an executable file. The Select Item in Project dialog box opens.
6. Select the executable file to be associated with the file type."

1
184 You are working as a developer in Infosol Inc. You are part of the team that is developing a deployment project for the application that is created by the team. You are asked to set the environment variable named PATH on each target machine on which your application will execute. Identify the steps that you need to perform to accomplish the desired task.
"1,
 1. Select the HKEY_CURRENT_USER key in the Registry editor.
2. In the Action menu, select New-->String Value. Change the name of the newly created value to PATH.
3. Select Action-->New Key. Change the name of the new key to ENVIRONMENT.
4. Select the ENVIRONMENT key.
5. Select PATH, and press the F4 key to switch to the Properties window. Set the Value property to C:\;C:\Windows."
"2, 
1. Select the HKEY_CURRENT_USER key in the Registry editor.
2. Select Action-->New Key. Change the name of the new key to ENVIRONMENT.
3. Select the ENVIRONMENT key.
4. In the Action menu, select New-->String Value. Change the name of the newly created value to PATH.
5. Select PATH, and press the F4 key to switch to the Properties window. Set the Value property to C:\;C:\Windows."
"3,
 1. Select the HKEY_CURRENT_USER key in the Registry editor.
2. Select Action-->New Key. Change the name of the new key to ENVIRONMENT.
3. In the Action menu, select New-->String Value. Change the name of the newly created value to PATH.
4. Select the ENVIRONMENT key.
5. Select PATH, and press the F4 key to switch to the Properties window. Set the Value property to C:\;C:\Windows."
"4,
 1. Select the HKEY_CURRENT_USER key in the Registry editor.
2. In the Action menu, select New-->String Value. Change the name of the newly created value to PATH.
3. Select PATH, and press the F4 key to switch to the Properties window. Set the Value property to C:\;C:\Windows.
4. Select Action-->New Key. Change the name of the new key to ENVIRONMENT.
5. Select the ENVIRONMENT key."

2

185 Programs and libraries for .NET are packaged into units called ________. 1,Global Assembly Cache 2, Assemblies   3, Resources    4, Manifest

2
186 Which of the following commands is required to create a strong-named key pair and store it in a file using the sn.exe utility?
1, sn -k filename.snk 2, sn -k filename 3, sn +k filename.snk 4, sn k filename.snk

1
187 Which of the following options can be used with the gacutil command to register the assembly to the GAC?
1, /L 2, /I 3, /u 4, /U

2
188 Using the Visual Studio .NET deployment tools, you can deploy the applications that cannot be deployed by using the ______ command.
1, sn -k filename.snk 2, ILdasm <assembly name> 3, gacutil 4, XCOPY

4
189 Which of the following registry keys stores information about file extensions and their association with executable files?
1, HKEY_CLASSES_ROOT 2, HKEY_USERS
3, HKEY_CURRENT_USER 4, HKEY_LOCAL_MACHINE

1
190 The Custom Actions editor contains ___________ sections.
1, Five           2, Two 3, Three 4, Four

4
191 Which of the following elements is the root element of every configuration file used by the CLR and .NET Framework applications?
1, <dependentAssembly>
2, <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
3, <runtime>
4, <configuration>

4
192 Which of the following section handlers of the .NET Framework returns a key-value pair configuration setting?
1, SingleTagSectionHandler 2, DictionarySectionHandler
3, IgnoreSectionHandler     4, NameValueSectionHandler

2
193 Which of the following permission sets is the default permission set for all code that runs from an unknown location or origin?
1, FullTrust         2, Everything
3, LocalIntranet 4, Internet

4
194 ___________ is the procedure of finding whether a user has rights to perform a specific action or not.
1, Authorization 2, Authentication
3, Windows Identity 4, Generic Identity

1
195 You are asked to create an assembly by using the Visual Studio .NET IDE for VC#. Identify the type of assembly that you can create.
1, Shared assembly 2, Private assembly
3, Multifile assembly 4, Single-File assembly

4
196 You are provided with the version number of an assembly, 6.4.0.3. Identify the minor version number.
1, 3 2, 0 3, 4 4, 6

3
197 You are asked to create the deployment project. You need to add the .exe and .dll files to the deployment project. Which of the following editors you need to use to accomplish the desired task?
1, Registry Editor          2, File System Editor
3, User Interface Editor 4, File Types Editor

2
198 You are asked to put the settings, of the third-party component used by both the client application and server application, at one place. In which of the following files, you will put the information about the component?
1, Extensible Markup Language (XML) files
2, Application Configuration Files
3, Machine Configuration Files
4, Security Configuration Files

3
199 You are asked to access configuration settings from the application. Which of the following methods you need to use to accomplish the desired task?
1, ConfigurationSettings.AppSettings() 2, Configuration.AppSettings()
3, Configuration.GetConfig() 4, ConfigurationSettings.GetConfig()

4
200 "John is working as an application developer in Infosol Inc. He is creating a deployment project. He is asked to add a sub folder to the deployment project with the help of the File System editor. He performs the following steps to add the sub folder:
1. Select a folder in the File System editor.
2. Select Action-->Add Special Folder-->Custom Folder.
3. Type the name of the newly created subfolder.

However, he finds that the desired folder is not created. Help him to identify the error he made."
"1, Second step is not correct. He should perform the following step:
Select Action-->Add Special Folder-->Folder"
"2, Second step is not correct. He should perform the following step:
Select Action-->Add Special Folder"
"3, First step is not correct. He should perform the following step:
Select the File System on Target Machine node."
"4, The second step is not correct. He should perform the following step:
Select Action-->Add-->Folder"

4

Post a Comment

Previous Post Next Post