单项选择题
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.)
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.")]
相关考题
-
单项选择题
You use Microsoft .NET Framework 4 to create a Windows Forms client application. You write the following code segment. The application contains a form of type Form1 that contains a FormSettings object named frmSettings1. You need to maintain the users form size preference each time the user executes the application. Which code segment should you use? ()
A.
B.
C.
D. -
单项选择题
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?()
A.
B.
C.
D. -
单项选择题
You use Microsoft .NET Framework 4 to create an application. The application contains a partially trusted client assembly and a server assembly. You create a custom sandboxed application domain. You need to ensure that the application can be executed in a partial-trust environment. What should you do?()
A. Apply the following attribute to the server assembly. [assembly: AllowPartiallyTrustedCallers(PartialTrustVisibilityLevel=VisibleToAllHosts)]
B. Apply the following attribute to the server assembly. [assembly: AllowPartiallyTrustedCallers(PartialTrustVisibilityLevel=NotVisibleByDefault)]
C. Apply the following attribute to the client assembly. [assembly: AllowPartiallyTrustedCallers(PartialTrustVisibilityLevel=VisibleToAllHosts)]
D. Apply the following attribute to the client assembly. [assembly: AllowPartiallyTrustedCallers(PartialTrustVisibilityLevel=NotVisibleByDefault)]
