PrepAway - Latest Free Exam Questions & Answers

Category: 70-511

Exam 70-511: TS: Windows Applications Development with Microsoft .NET Framework 4

Which code segment should you insert at line 03?

You use Microsoft .NET Framework 4 to create a Windows Forms application.
You write the following code segment. (Line numbers are included for reference only.)
01sealed class FormSettings :
ApplicationSettingsBase
02{
03
04public String Description
05{
06get { return (String)this[“Description”]; }
07set { this[“Description”] = value;}
08}
09}
You need to ensure that the first time each user opens the application, a text field displays the following message: “Please enter your setting.”
Which code segment should you insert at line 03?

Which code segment should you use?

You use Microsoft .NET Framework 4 to create a Windows Forms client application.
You write the following code segment.
sealed class FormSettings : ApplicationSettingsBase {
[UserScopedSetting()]
[DefaultSettingValue(“225, 200”)]
public Size FormSize
{
get { return (Size)this[“FormSize”]; }
set { this[“FormSize”] = value; }
}
}
The application contains a form of type Form1 that contains a FormSettings object named frmSettings1.
You need to maintain the user’s form size preference each time the user executes the application.
Which code segment should you use?

What should you do?

You upgrade a Windows Forms application to Microsoft .NET Framework 4. The application was developed
by using a previous version of the .NET Framework. The application uses the Code
Access Security (CAS) policy for file access.
When the application is executed, you receive the following exception:
“NotSupportedException: This method uses CAS policy, which has been obsoleted by the .NET Framework.”
You need to resolve the error.
What should you do?


Page 11 of 13« First...910111213