KillTest Exam:70-526 Questions and Answers
首頁 >> Microsoft >> MCTS >> "MCTS 70-526"題庫

70-526

Microsoft .NET Framework 2.0 - Windows-based Client Development is in development

MCTS 70-526考試題庫由KillTest認證題庫網資深IT認證講師和MCTS產品專家結合PROMETRIC或VUE的真實70-526考試環境最新原題傾心打造。

題庫覆蓋了當前最新的真實考題,並且全部附有正確答案,我們承諾題庫對MCTS 70-526(Microsoft .NET Framework 2.0 - Windows-based Client Development is in development)考試原題完整覆蓋。70-526題庫助您輕鬆通過認證考試,一次不過全額退款。

Microsoft .NET Framework 2.0 - Windows-based Client Development is in development

70-526
認證編號 Q&A 更新 價格(美元)

70-526

133 Q&A 2008-12-01 $ 89

MCTS 70-526(Microsoft .NET Framework 2.0 - Windows-based Client Development is in development)考題由我們的資深IT認證講師和MCTS產品專家精心打造,包括了當前最新的真實70-526考題,全部附有正確答案

所有購買KillTest 70-526 題庫的客戶都將得到60天的免費升級服務,保證了客戶的一次通過率。KillTest IT認證題庫網助您一次通過MCTS 70-526考試。

1、本題庫源自合作考試中心的真實考試原題,截屏后由我們的專業團隊匯總整理,再經過合作培訓中心資深IT認證講師對考題校對,保證了認證考試題庫的專業品質,題庫試題正確率100%,對70-526認證考試考題覆蓋率96%以上。您只需在參加MCTS 70-526認證前整體學習下本題庫,必定可以輕鬆完成考試,一次通過認證。

2、KillTest 實行“一次不過全額退款”承諾。如果您購買了我們的《70-526 Exam》考題,只要不是首次通過,憑蓋有PROMETRICVUE考試中心鋼印的考試成績單,我們將退還您購買70-526題庫的全部費用,絕對保證您的利益不受到任何的損失。(全額退款詳情)

3、作為亞太地區最專業的IT認證試題題庫供應商,我們提供完善的售後服務,我們對所有購買題庫的客戶提供跟蹤服務,在您購買考題后的60天內,享受免費升級考題服務,如果在這期間,認證考試中心對70-526考題做出修改或變題,我們會在第一時間更新相關題庫,并免費提供給您更新下載。

Microsoft .NET Framework 2.0 - Windows-based Client Development is in development(70-526 Exam)屬於MCTS認證考試中的一門,如果需要取得MCTS證書,您可能還需要參加其他相關考試,詳情可訪問MCTS認證專題,在那裡,你將看到所有MCTS認證相關考試科目。

70-526:下载70-526考试题库演示部分(PDF格式)70-526下載

70-526题库部分演示(DEMO)

1.You are creating a Windows Form. You add a TableLayoutPanel control named pnlLayout to the form. You set the properties of pnlLayout so that it will resize with the form.
You need to create a three-column layout that has fixed left and right columns. The fixed columns must each remain 50 pixels wide when the form is resized. The middle column must fill the remainder of the form width when the form is resized. You add the three columns in the designer.
Which code segment should you use to format the columns at run time?
A. pnlLayout.ColumnStyles.Clear();
pnlLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute,  50F));
pnlLayout.ColumnStyles.Add(new ColumnStyle(SizeType.AutoSize, 100F));
pnlLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute,  50F));
B. pnlLayout.ColumnStyles[0].Width = 50F;
pnlLayout.ColumnStyles[0].SizeType = SizeType.Absolute;
pnlLayout.ColumnStyles[2].Width = 50F;
pnlLayout.ColumnStyles[2].SizeType = SizeType.Absolute;
C. pnlLayout.ColumnStyles[0].Width = 50F;
pnlLayout.ColumnStyles[0].SizeType = SizeType.Absolute;
pnlLayout.ColumnStyles[1].Width = 100F;
pnlLayout.ColumnStyles[1].SizeType = SizeType.AutoSize;
pnlLayout.ColumnStyles[2].Width = 50F;
pnlLayout.ColumnStyles[2].SizeType = SizeType.Absolute;
D. pnlLayout.ColumnStyles.Clear();
pnlLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 50F));
pnlLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
pnlLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 50F));
Answer: D

2. You are creating a Windows Form. You add a TableLayoutPanel control named pnlLayout to the form. You set the properties of pnlLayout so that it will resize with the form.
You need to create a three-column layout that has fixed left and right columns. The fixed columns must each remain 50 pixels wide when the form is resized. The middle column must fill the remainder of the form width when the form is resized. You add the three columns in the designer.
Which code segment should you use to format the columns at run time?
A. pnlLayout->ColumnStyles->Clear();
pnlLayout->ColumnStyles->Add(gcnew ColumnStyle(SizeType::Absolute, 50));
pnlLayout->ColumnStyles->Add(gcnew ColumnStyle(SizeType::AutoSize, 100));
pnlLayout->ColumnStyles->Add(gcnew ColumnStyle(SizeType::Absolute, 50));
B. pnlLayout->ColumnStyles[0]->Width = 50;
pnlLayout->ColumnStyles[0]->SizeType = SizeType::Absolute;
pnlLayout->ColumnStyles[2]->Width = 50;
pnlLayout->ColumnStyles[2]->SizeType = SizeType::Absolute;
C. pnlLayout->ColumnStyles[0]->Width = 50;
pnlLayout->ColumnStyles[0]->SizeType = SizeType::Absolute;
pnlLayout->ColumnStyles[1]->Width = 100;
pnlLayout->ColumnStyles[1]->SizeType = SizeType::AutoSize;
pnlLayout->ColumnStyles[2]->Width = 50;
pnlLayout->ColumnStyles[2]->SizeType = SizeType::Absolute;
D. pnlLayout->ColumnStyles->Clear();
pnlLayout->ColumnStyles->Add(gcnew ColumnStyle(SizeType::Absolute, 50));
pnlLayout->ColumnStyles->Add(gcnew ColumnStyle(SizeType::Percent, 100));
pnlLayout->ColumnStyles->Add(gcnew ColumnStyle(SizeType::Absolute, 50));
Answer: D

3. You are creating a setup project. You want to add functionality that will execute only if the setup project is executed by an administrative user.
You need to configure features of your installation package to execute only when the installation is run by an administrative user.
Which setup project editor supports this functionality by default?
A. File System Editor
B. Registry Editor
C. User Interface Editor
D. Custom Actions Editor
Answer: C

4. You are creating a Windows Forms application. You add an ErrorProvider component named erpErrors and a DateTimePicker control named dtpStartDate to the application. The application also contains other controls.
You need to configure the application to display an error notification icon next to dtpStartDate when the user enters a date that is greater than today's date.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A. For the Validating event of dtpStartDate, create an event handler named VerifyStartDate.
B. For the Validated event of dtpStartDate, create an event handler named VerifyStartDate.
C. In the Properties Window for dtpStartDate, set the value of Error on erpErrors to Date out of range.
D. In VerifyStartDate, call erpErrors.SetError(dtpStartDate, "Date out of range") if the value of dtpStartDate.Value is greater than today's date.
E. In VerifyStartDate, call erpErrors.SetError(dtpStartDate, null) if the dtpStartDate.Value is greater than today's date.
Answer: D AND A

5. You are creating a Windows Form that includes a TextBox control named txtDate.
When a user right-clicks within the text box, you want the application to display a MonthCalendar control.
You need to implement a context menu that provides this functionality.
What should you do?
A. Add the following code to the form initialization.
MonthCalendar cal = new MonthCalendar();
ContextMenuStrip mnuContext = new ContextMenuStrip();
ToolStripControlHost host = new ToolStripControlHost(mnuContext);
txtDate.ContextMenuStrip = mnuContext;
B. Add the following code to the form initialization.
ContextMenuStrip mnuContext = new ContextMenuStrip();
MonthCalendar cal = new MonthCalendar();
ToolStripControlHost host = new ToolStripControlHost(cal);
mnuContext.Items.Add(host);
txtDate.ContextMenuStrip = mnuContext;
C. Add the following code to the form initialization.
ToolStripContainer ctr = new ToolStripContainer();
MonthCalendar cal = new MonthCalendar();
ctr.ContentPanel.Controls.Add(cal);
txtDate.Controls.Add(ctr);
Add a MouseClick event handler for the TextBox control that contains the following code.
if (e.Button == MouseButtons.Right) {txtDate.Controls[0].Show();
}
D. Add a MouseClick event handler for the TextBox control that contains the following code.
if (e.Button == MouseButtons.Right) {
ContextMenuStrip mnuContext = new ContextMenuStrip();
MonthCalendar cal = new MonthCalendar();
ToolStripControlHost host = new ToolStripControlHost(cal);
mnuContext.Items.Add(host);
txtDate.ContextMenuStrip = mnuContext;
}
Answer: B

6. You are customizing a Windows Form. When the user clicks any button, you want the application to log information about the user??s actions by calling a method with the following signature.
public void ctl_Click(object sender, EventArgs e)
You want the form to invoke this method when any Button control is clicked and only when a Button control is clicked.
You need to modify the form to invoke this method without interfering with the existing operations of the application.
What should you do?
A. Add the following code to the form initialization.
foreach (Control ctl in this.Controls) {
 if (ctl is Button){
  ctl.Click += new EventHandler(ctl_Click);
 }
}
B. Add the following code to the form initialization.
 this.Click += new EventHandler(ctl_Click);
C. Use the Properties dialog box to set the Click event for each Button control on the form to the ctl_Click method.
D. Use the Properties dialog box to set the Click event of the form to the ctl_Click method.
Answer: A

7. You are customizing a Windows Form. When the user clicks any button, you want the application to log information about the user??s actions by calling a method with the following signature.

You want the form to invoke this method when any Button control is clicked and only when a Button control is clicked.
You need to modify the form to invoke this method without interfering with the existing operations of the application.
What should you do?
A. Add the following code to the form initialization.
for each (Control ^ctl in this->Controls) {
 if (dynamic_cast< Button ^ >(ctl) != nullptr){
  ctl->Click += gcnew EventHandler(this, &Form1::ctl_Click);
 }
}
B. Add the following code to the form initialization.
 this->Click += gcnew EventHandler(this,&Form1::ctl_Click);
C. Use the Properties dialog box to set the Click event for each Button control on the form to the ctl_Click method.
D. Use the Properties dialog box to set the Click event of the form to the ctl_Click method.
Answer: A

8. You are customizing a Windows Form. When the user clicks any button, you want the application to log information about the user??s actions by calling a method with the following signature.

You want the form to invoke this method when any Button control is clicked and only when a Button control is clicked.
You need to modify the form to invoke this method without interfering with the existing operations of the application.
What should you do?
A. Add the following code to the form initialization.
Dim ctl As Control
For Each ctl In Me.Controls
 If TypeOf ctl Is Button Then
  AddHandler ctl.Click, AddressOf ctl_Click
 End If
Next ctl
B. Add the following code to the form initialization.
 AddHandler Me.Click, AddressOf ctl_Click
C. Use the Properties dialog box to set the Click event for each Button control on the form to the ctl_Click method.
D. Use the Properties dialog box to set the Click event of the form to the ctl_Click method.
Answer: A

9. You are creating a Windows Forms setup application. The default user interface does not meet your needs. You want to provide an additional dialog box that includes two check boxes during the install process. You want the check boxes to give users the option to install two large Help files named Help1 and Help2 during the installation process.
You need to customize the interface to meet your needs.
Which three actions should you perform? (Each correct answer presents part of the solution. Choose three.)
A. Create the dialog box and the logic for the dialog box in a separate project.
 Compile the project into an executable, and add the executable to the setup project.
B. In the User Interface Editor, add a Checkboxes dialog box to the Start node of the user interface tree.
C. Use the Custom Actions Editor to add the dialog box executable for the setup application to the Install node.
D. In the Properties window for your setup project, set the PreBuildEvent property to call a command line to display the dialog box.
E. In the File System Editor, set the Condition property for Help1 to the value of the Checkbox1Property property.
 Set the Condition property for Help2 to the value of the Checkbox2Property property.
F. Set the Checkbox3Visible and Checkbox4Visible properties of the Checkboxes dialog box to False.
Answer: F AND E AND B

10. You created a custom action for your Windows setup application. The custom action runs a standard Console application at the end of the installation process.
You place the custom action in the Install node of the Custom Actions tree in the Custom Actions Editor. The Console application executable performs correctly when run as a stand-alone application. However, when you run the Microsoft Windows Installer package that was created by your setup application, the custom action does not run. Everything else works fine.
You need to ensure that the console application runs during the install.
What should you do?
A. Set the InstallerClass property of your custom action to False.
B. Place the custom action in the Commit node of the Custom Actions tree rather than in the Install node.
C. Set the DetectNewerInstalledVersion property for your setup application to True.
D. Set the InstallAllUsers property for your setup application to True.
Answer: A

11. You are creating a Windows Forms application. You want the installer to display an HTML document that contains important information after users install your application.
You need to configure your application to display the HTML document.
What should you do?
A. Set the SupportUrl property of your primary output to the path of the HTML document.
B. Create a Custom Install Action that calls the Process.Start method, passing in the path of the HTML document as the fileName parameter.
C. Set the PostBuild event of your installation project to the path of the HTML document.
D. Create a Custom Commit Action that calls the Process.Start method, passing in the path of the HTML document as the fileName parameter.
Answer: D

12. You want to create a custom installer component to install your Windows-based application on client computers.
Which three actions should you perform? (Each correct answer presents part of the solution. Choose three.)
A. Inherit from the Installer class.
B. Inherit from the AssemblyInstaller class.
C. Add the RunInstallerAttribute to your derived class and set it to True.
D. Add the InstallerTypeAttribute to your derived class and set it to CustomInstaller.
E. Register the installer.
F. Override the Install, Commit, Rollback, and Uninstall methods as required.
Answer: F AND C AND A

13. You are customizing a Windows Form. The form includes a menu that has several ToolStripMenuItem controls. An event handler is configured to handle the Click event for all ToolStripMenuItem controls. The event handler has the following signature.

You need to add code so that when a user clicks a ToolStripMenuItem control, the mnu_Click method calls the LogClick method. The LogClick method must be called with the ctlName parameter set to the menu text in the ToolStripMenuItem control.
Which code segment should you use?
A. ToolStripMenuItem mnuItem = (ToolStripMenuItem)sender;
 LogClick(mnuItem.Text);
B. LogClick(e.ToString());
C. LogClick(this.Text);
D. ToolStripMenuItem mnuItem = (ToolStripMenuItem)
this.GetContainerControl();
LogClick(mnuItem.Text);
Answer: A

14. You are customizing a Windows Form. The form includes a menu that has several ToolStripMenuItem controls. An event handler is configured to handle the Click event for all ToolStripMenuItem controls. The event handler has the following signature.

You need to add code so that when a user clicks a ToolStripMenuItem control, the mnu_Click method calls the LogClick method. The LogClick method must be called with the ctlName parameter set to the menu text in the ToolStripMenuItem control.
Which code segment should you use?
A. ToolStripMenuItem ^mnuItem = (ToolStripMenuItem^)sender;
 LogClick(mnuItem->Text);
B. LogClick(e->ToString());
C. LogClick(this->Text);
D. ToolStripMenuItem ^mnuItem = (ToolStripMenuItem^)
this->GetContainerControl();
LogClick(mnuItem->Text);
Answer: A

15. You are customizing a Windows Form. The form includes a menu that has several ToolStripMenuItem controls. An event handler is configured to handle the Click event for all ToolStripMenuItem controls. The event handler has the following signature.

You need to add code so that when a user clicks a ToolStripMenuItem control, the mnu_Click method calls the LogClick method. The LogClick method must be called with the ctlName parameter set to the menu text in the ToolStripMenuItem control.
Which code segment should you use?
A. Dim mnuItem As ToolStripMenuItem = Ctype(sender, ToolStripMenuItem)
 LogClick(mnuItem.Text)
B. LogClick(e.ToString())
C. LogClick(Me.Text)
D. Dim mnuItem As ToolStripMenuItem =
Ctype(Me.GetContainerControl(), ToolStripMenuItem)
LogClick(mnuItem.Text)
Answer: A

16. You are creating a Windows Forms application. Initialization code loads a DataSet object named ds that includes a table named Users. The Users table includes a column named IsManager.
You need to bind the IsManager column to the Checked property of a check box named chkIsManager.
Which code segment should you use?
A. chkIsManager.DataBindings.Add("Checked", ds, "Users.IsManager");
B. chkIsManager.DataBindings.Add("Checked", ds, "IsManager");
C. chkIsManager.Text = "{Users.IsManager}";
 chkIsManager.AutoCheck = true;
D. this.DataBindings.Add("chkIsManager.Checked", ds, "Users.IsManager");
Answer: A

17. You are modifying an existing installation package for your application. Your application requires Microsoft Windows Server 2003 and will not run on Microsoft Windows 2000 Server. You add the following condition to the primary output of your installer.
VersionNT>=502
Users who previously attempted to install your application on Windows 2000 Server report that they still cannot install your application after they upgrade to Windows Server 2003.
You need to ensure that users who upgrade the operating system on their servers to meet your launch condition can successfully reinstall your application.
What should you do?
A. Set the Transitive property of the primary output to True.
B. Change the UpgradeCode property of your Setup application.
C. Set the Vital property of the primary output to True.
D. Change the launch condition of your primary output to VersionNT>=500.
Answer: A

18. You are creating a Windows Forms application. Initialization code loads a DataSet object named ds that includes a table named Users. The Users table includes a column named IsManager.
You need to bind the IsManager column to the Checked property of a check box named chkIsManager.
Which code segment should you use?
A. chkIsManager.DataBindings.Add("Checked", ds, "Users.IsManager")
B. chkIsManager.DataBindings.Add("Checked", ds, "IsManager")
C. chkIsManager.Text = "{Users.IsManager}"
 chkIsManager.AutoCheck = True
D. Me.DataBindings.Add("chkIsManager.Checked", ds, "Users.IsManager")
Answer: A

19. A method in your Windows Forms application executes a stored procedure in a Microsoft SQL Server 2005 database, and then executes a second stored procedure in a second SQL Server 2005 database.
You need to ensure that the call to the first stored procedure writes changes only if the call to the second stored procedure succeeds. Installation requirements prohibit you from introducing new components that use the COM+ hosting model.
What should you do?
A. Implement a transactional serviced component.
Add methods to this component to encapsulate the connect operation and execution of each stored procedure.
Register and use this serviced component.
B. Add a TransactionScope block.
Connect to each database and execute each stored procedure within the TransactionScope block.
Call the TransactionScope.Complete method if the call to both stored procedure succeeds.
C. Connect to both databases.
Call the SqlConnection.BeginTransaction method for each connection.
Call the SqlTransaction.Commit method on both returned transactions only if both stored procedures succeed.
D. Add a try-catch-finally block.
 Connect to each database and execute each stored procedure in the try block.
Answer: B

20. A method in your Windows Forms application executes a stored procedure in a Microsoft SQL Server 2005 database, and then executes a second stored procedure in a second SQL Server 2005 database.
You need to ensure that the call to the first stored procedure writes changes only if the call to the second stored procedure succeeds. Installation requirements prohibit you from introducing new components that use the COM+ hosting model.
What should you do?
A. Implement a transactional serviced component.
Add methods to this component to encapsulate the connect operation and execution of each stored procedure.
Register and use this serviced component.
B. Add a TransactionScope block.
Connect to each database and execute each stored procedure within the TransactionScope block.
Call the TransactionScope::Complete method if the call to both stored procedure succeeds.
C. Connect to both databases.
Call the SqlConnection::BeginTransaction method for each connection.
Call the SqlTransaction::Commit method on both returned transactions only if both stored procedures succeed.
D. Add a try-catch-finally block.
 Connect to each database and execute each stored procedure in the try block.
Answer: B

21. You are testing an installation package for a Windows Forms application. You notice that the installed application will not run on client computers that do not have the .NET Framework installed.
You need to ensure that when a user installs the application on his or her client computer, the .NET Framework is also installed.
What should you do?
A. Select the .NET Framework in the Dependencies property value in the project's property grid.
B. Verify that the .NET Framework redistributable package check box is selected under the Prerequisites button on the Setup property pages.
C. Add the .NET Framework redistributable package to the setup project in the File System Editor.
D. Create a Custom Actions Editor that copies the .NET Framework redistributable package to the application??s root directory.
Answer: B

22. You are creating a Windows Forms application that includes the database helper methods UpdateOrder and UpdateAccount. Each method wraps code that connects to a Microsoft SQL Server 2005 database, executes a Transact-SQL statement, and then disconnects from the database.
You must ensure that changes to the database that result from the UpdateAccount method are committed only if the UpdateOrder method succeeds.
You need to execute the UpdateAccount method and the UpdateOrder method.
Which code segment should you use?
A. using (TransactionScope ts = new TransactionScope()) {
 UpdateOrder();
 UpdateAccount();
 ts.Complete();
}
B. using (TransactionScope ts1 = new TransactionScope()) {
 UpdateOrder();
 using (TransactionScope ts2 = new
  TransactionScope(TransactionScopeOption.RequiresNew)){
  UpdateAccount();
  ts2.Complete();
 }
 ts1.Complete();
}
C. using (TransactionScope ts = new
 TransactionScope(TransactionScopeOption.RequiresNew)){
 UpdateOrder();
 ts.Complete();
}
using (TransactionScope ts = new
TransactionScope(TransactionScopeOption.Required)){
 UpdateAccount();
 ts.Complete();
}
D. using (TransactionScope ts = new
 TransactionScope(TransactionScopeOption.RequiresNew)){
 UpdateOrder();
}
using (TransactionScope ts = new
 TransactionScope(TransactionScopeOption.Required)){
 UpdateAccount();
 ts.Complete();
}
Answer: A

23. You are creating a Windows Forms application that includes the database helper methods UpdateOrder and UpdateAccount. Each method wraps code that connects to a Microsoft SQL Server 2005 database, executes a Transact-SQL statement, and then disconnects from the database.
You must ensure that changes to the database that result from the UpdateAccount method are committed only if the UpdateOrder method succeeds.
You need to execute the UpdateAccount method and the UpdateOrder method.
Which code segment should you use?
A. TransactionScope ^ts = gcnew TransactionScope();
try {
 UpdateOrder();
 UpdateAccount();
 ts->Complete();
} finally {
 delete ts;
}
B. TransactionScope ^ts1 = gcnew TransactionScope();
try {
 UpdateOrder();
 TransactionScope ^ts2 = gcnew
  TransactionScope(TransactionScopeOption::RequiresNew);
  try {
   UpdateAccount();
   ts2->Complete();
  } finally {
   delete ts2;
  }
 ts1->Complete();
} finally {
 delete ts1;
}
C. TransactionScope ^ts = gcnew TransactionScope(TransactionScopeOption::RequiresNew);
try {
 UpdateOrder();
 ts->Complete();
} finally {
 delete ts;
}
ts = gcnew TransactionScope(TransactionScopeOption::Required);
try {
 UpdateAccount();
 ts->Complete();
} finally {
 delete ts;
}
D. TransactionScope ^ts = gcnew TransactionScope(TransactionScopeOption::RequiresNew);
try {
 UpdateOrder();
} finally {
 delete ts;
}
TransactionScope ^ts = gcnew
TransactionScope(TransactionScopeOption::Required);
try {
 UpdateAccount();
 ts->Complete();
} finally {
 delete ts;
}
Answer: A

24. You are creating a Windows Forms application that includes the database helper methods UpdateOrder and UpdateAccount. Each method wraps code that connects to a Microsoft SQL Server 2005 database, executes a Transact-SQL statement, and then disconnects from the database.
You must ensure that changes to the database that result from the UpdateAccount method are committed only if the UpdateOrder method succeeds.
You need to execute the UpdateAccount method and the UpdateOrder method.
Which code segment should you use?
A. Using ts As New TransactionScope()
 UpdateOrder()
 UpdateAccount()
 ts.Complete()
End Using
B. Using ts1 As New TransactionScope()
 UpdateOrder()
 Using ts2 As New
  TransactionScope(TransactionScopeOption.RequiresNew)
  UpdateAccount()
  ts2.Complete()
 End Using
 ts1.Complete()
End Using
 ts1.Complete();
C. Using ts1 As New TransactionScope()
 UpdateOrder()
 Using ts2 As New
  TransactionScope(TransactionScopeOption.RequiresNew)
  UpdateAccount()
  ts2.Complete()
 End Using
 ts1.Complete()
End Using
D. Using ts As New TransactionScope(TransactionScopeOption.RequiresNew)
 UpdateOrder()
End Using
Using ts As New TransactionScope(TransactionScopeOption.Required)
 UpdateAccount()
 ts.Complete()
End Using
Answer: A

25. You are creating a Windows Forms application. The application uses a SqlCommand object named cmd. The cmd object executes the following stored procedure.

You need to add all returned rows to the ListBox control named lstPhones.
Which code segment should you use?
A. SqlDataReader rdr = cmd.ExecuteReader();
do {
 while (rdr.Read()) {
  lstPhones.Items.Add(rdr.GetString(0) + "\t" + rdr.GetString(1));
 }
} while (rdr.NextResult());
B. SqlDataReader rdr = cmd.ExecuteReader();
while (rdr.Read()) {
 lstPhones.Items.Add(rdr.GetString(0) + "\t" + rdr.GetString(1));
}
C. SqlDataReader rdr = cmd.ExecuteReader();
while (rdr.NextResult()) {
 while (rdr.Read()) {
  lstPhones.Items.Add(rdr.GetString(0) + "\t" + rdr.GetString(1));
 }
}
D. SqlDataReader rdr = cmd.ExecuteReader();
while (rdr.NextResult()) {
 lstPhones.Items.Add(rdr.GetString(0) + "\t" + rdr.GetString(1));
}
Answer: A

26. You are creating a Windows Forms application. The application uses a SqlCommand object named cmd. The cmd object executes the following stored procedure.

You need to add all returned rows to the ListBox control named lstPhones.
Which code segment should you use?
A. SqlDataReader ^rdr = cmd->ExecuteReader();
do {
 while (rdr->Read()) {
  lstPhones->Items->Add(rdr->GetString(0) + "\t" + rdr->GetString(1));
 }
} while (rdr->NextResult());
B. SqlDataReader ^rdr = cmd->ExecuteReader();
while (rdr->Read()) {
 lstPhones->Items->Add(rdr->GetString(0) + "\t" + rdr->GetString(1));
}
C. SqlDataReader ^rdr = cmd->ExecuteReader();
while (rdr->NextResult()) {
 while (rdr->Read()) {
  lstPhones->Items->Add(rdr->GetString(0) + "\t" + rdr->GetString(1));
 }
}
D. SqlDataReader ^rdr = cmd->ExecuteReader();
while (rdr->NextResult()) {
 lstPhones->Items->Add(rdr->GetString(0) + "\t" + rdr->GetString(1));
}
Answer: A

27. You are creating a Windows Forms application. The application uses a SqlCommand object named cmd. The cmd object executes the following stored procedure.

You need to add all returned rows to the ListBox control named lstPhones.
Which code segment should you use?
A. Dim rdr As SqlDataReader = cmd.ExecuteReader()
Do
  While rdr.Read()
  lstPhones.Items.Add((rdr.GetString(0) + ControlChars.Tab + rdr.GetString(1)))
  End While
Loop While rdr.NextResult()
B. Dim rdr As SqlDataReader = cmd.ExecuteReader()
While rdr.Read()
  lstPhones.Items.Add((rdr.GetString(0) + ControlChars.Tab + rdr.GetString(1)))
End While
C. Dim rdr As SqlDataReader = cmd.ExecuteReader()
While rdr.NextResult()
  While rdr.Read()
    lstPhones.Items.Add((rdr.GetString(0) + ControlChars.Tab + rdr.GetString(1)))
  End While
End While
D. Dim rdr As SqlDataReader = cmd.ExecuteReader()
While rdr.NextResult()
  lstPhones.Items.Add((rdr.GetString(0) + ControlChars.Tab + rdr.GetString(1)))
End While
Answer: A

28. You are creating a Windows Forms application. The application loads a data table named dt from a database and modifies each value in the data table.
You add the following code. (Line numbers are included for reference only.)

You need to format the string named str to show the value of the column at the time the data is loaded and the current value in the column.
Which code segment should you add at line 03?
A. string str = String.Format("Column was {0} is now {1}",
row[col],
row[col, DataRowVersion.Current]);
B. string str = String.Format("Column was {0} is now {1}",
row[col, DataRowVersion.Default],
row[col]);
C. string str = String.Format("Column was {0} is now {1}",
row[col],
row[col, DataRowVersion.Proposed]);
D. string str = String.Format("Column was {0} is now {1}",
row[col, DataRowVersion.Original],
row[col]);
Answer: D

29. You are creating a Windows Forms application. The application loads a data table named dt from a database and modifies each value in the data table.
You add the following code. (Line numbers are included for reference only.)

You need to format the string named str to show the value of the column at the time the data is loaded and the current value in the column.
Which code segment should you add at line 03?
A. String ^str = String::Format("Column was {0} is now {1}",
row[col],
row[col, DataRowVersion::Current]);
B. String ^str = String::Format("Column was {0} is now {1}",
row[col, DataRowVersion::Default],
row[col]);
C. String ^str = String::Format("Column was {0} is now {1}",
row[col],
row[col, DataRowVersion::Proposed]);
D. String ^str = String::Format("Column was {0} is now {1}",
row[col, DataRowVersion::Original],
row[col]);
Answer: D

30. You are creating a Windows Forms application. The application loads a data table named dt from a database and modifies each value in the data table.
You add the following code. (Line numbers are included for reference only.)

You need to format the string named str to show the value of the column at the time the data is loaded and the current value in the column.
Which code segment should you add at line 05?
A. Dim str As String = String.Format("Column was {0} is now {1}",
 row(col), row(col, DataRowVersion.Current))
B. Dim str As String = String.Format("Column was {0} is now {1}",
 row(col, DataRowVersion.Default), row(col))
C. Dim str As String = String.Format("Column was {0} is now {1}",
 row(col), row(col, DataRowVersion.Proposed))
D. Dim str As String = String.Format("Column was {0} is now {1}",
 row(col, DataRowVersion.Original), row(col))
Answer: D

KillTest IT認證題庫網專業提供MCTS 70-526最新題庫下載,完全覆蓋70-526考試原題。70-526:MCTS 70-526 Questions and Answers,Microsoft .NET Framework 2.0 - Windows-based Client Development is in development

   
密碼:
購物車目前選購了 0 件題庫