Which code segment should you use?
You are writing a method to compress an array of bytes. The bytes to be compressed are passed to the method in a parameter named document. You need to compress the
contents of the incoming parameter. Which code segment should you use?
Which three actions should you perform?
You are creating a class that uses unmanaged resources. This class maintains references to managed resources on other objects. You need to ensure that users of this class can explicitly release resources when the class instance ceases to be needed.
Which three actions should you perform? (Each correct answer presents part of the solution. Choose three.)
What should you conclude?
You are an enterprise application developer. You create a layered application. You must deploy the application in a three-tier environment. Tier 1 consists of the presentation components deployed on a Web server. Tier 2 consists of the business objects deployed on an application server. Tier 3 consists of a database deployed on a database server. You create a set of classes in a separate assembly as a data access layer to encapsulate the database access functionality. None of the classes in the data access layer inherits from the MarshalByRefObject class. Your team plans to deploy the data access layer component in tier 3. You need to evaluate whether the deployment plan will meet the requirements. What should you conclude?
Which code segment should you use?
You are developing an application that will use custom authentication and role-based security. You need to write a code segment to make the runtime assign an unauthenticated principal object to each running thread. Which code segment should you use?
Which code segment should you use?
You are creating an undo buffer that stores data modifications. You need to ensure that the undo functionality undoes the most recent data modifications first. You also need to ensure that the undo buffer permits the storage of strings only.
Which code segment should you use?
Which solution should you recommend?
You are an enterprise application developer. You create a client application. One thousand customer service agents use the application during their core business hours, from
8:00 to 17:00.
The application confirms to the following design details:
The application uses separate business logic components and data access logic components.
The data components run on the client computer and connect to a central Microsoft SQL Server 2005 database server.
When the application starts, it retrieves datasets to populate list boxes, drop-down list boxes, and TreeView controls that have data common to all users. Users are authenticated to the database by using Active Directory.
Users report that the application is slow to start. You need to recommend a solution so that the application starts normally. You want to achieve this goal with the minimum programming effort.
Which solution should you recommend?
What should you do?
You create Web-based client applications. The application permits users to upload files to a network share. When anonymous users use the upload feature from the Web-based application, a custom error page is displayed. You need to ensure that anonymous users are able to use the application. What should you do?
Which code segment should you use?
You need to write a code segment that will add a string named strConn to the connection string section of the application configuration file.
Which code segment should you use?
What should you conclude?
You are an enterprise application developer. You are designing a Microsoft Windows-based application that will use a third-party library. The third-party library is available in a single assembly. The library contains classes inside the Com.Util namespace. You can access the source code for this library. You must provide additional functionality that is not available in the third-party library. To conform to corporate policy, the additional functionality must be available in
the Com.Util namespace. A developer in your team decides to implement the additional functionality by modifying the source code of the third-party library. You need to evaluate whether
this implementation simplifies maintenance when new versions of the third-party library are released. What should you conclude?
Which code segment should you use?
You are using the Microsoft Visual Studio 2005 IDE to examine the output of
a method that returns a string. You assign the output of the method to a string variable named fName.
You need to write a code segment that prints the following on a single line
The message: “Test Failed: “
The value of fName if the value of fName does not equal “John”
You also need to ensure that the code segment simultaneously facilitates uninterrupted execution of the application. Which code segment should you use?