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?

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?

A.
[UserScopedSetting()] [DefaultSettingValue(“Please enter your setting.”)]

B.
[UserScopedSetting()] [SettingsDescription(“Description: Please enter your setting.”)]

C.
[ApplicationScopedSetting()] [DefaultSettingValue(“Please enter your setting.”)]

D.
[ApplicationScopedSetting()] [SettingsDescription(“Description: Please enter your setting.”)]



Leave a Reply 0

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