You are using Visual Studio .NET to develop an application to replace a COM-based application. You are assigned to write a . NET class that will be used by client applications as a COM object. Your class code is being moved and modified while development continues on the new application.You want to minimize any possible disruption to the COM interface as a result of code changes.Which code segment should you use?
A.
B.
C.
D. E.AutoDispatch) >Public Class MyClassToExpose Public Function Calc () As Integer 'Implementation code goes here.End Function End Class
试卷相关题目
- 1You develop an ADO.NET application that uses a Microsoft SQL Server database and a SqlClient data provider. Your application includes the following four code segments, which are each called once:Dim MyConnection 1 As New SqlConnection () MyConnectionl.Connectionstring = "Data Source=" & "ProdServer;Initial Catalog=Billing/& "Integrated Security=true"MyConnectionl.Open ()Dim MyConnection2 As New SqlConnection() MyConnection2.Connectionstring = "DataSource=" & "ProdServer;Initial Catalog=Billing;& "Integrated Security=true"MyConnection2.Open ()Dim MyConnection3 As New SqlConnection() MyConnection3.Connectionstring = "Data Source=" & "SearchServer;Initial Catalog=Search;& "Integrated Security=true"MyConnection3.Open()Dim MyConnectionl As New SqlConnection() MyConnectionl.Connectionstring ="Data Source=" & "ProdServer;Initial Catalog=OrderEntry;"& "Integrated Security=true"MyConnection4.Open()You verify that your application is the only application that is using SQL Server. Your application runs all code segments by using the same identity.You run the application. Connection pooling is enabled, and the entire application run within the connection timeout parameter.How many connection pools are created?
A.One
B.Two
C.Three
D.Four
开始考试点击查看答案 - 2As a software developer at your company, you are creating an XML Web service named DistributionService. This service must be able to access and manipulate data in a table named Inventory in a Microsoft SQL Server database.Some functions within Distribution Service need the inventory data to be exposed as XML data . Other functions within DistributionService need the inventory data to be exposed as a DataSet object.You need to create the object that will provide this data access.Which object should you use?
A.XmlDocument
B.XmlDocumentFragment
C.XPathDocument
D.XmlDataDocument
开始考试点击查看答案 - 3You have DataSet object named LoanCustomersDataSet that contains customers serviced by the loan department of your company. You receive a second DataSet that contains customers serviced by the asset management department of your company. Both objects have the same structure.You want to merge assetCustomersDataSet into LoancustomersDataSet and preserve the original values in loanCustomerDataSet.Which code segment should you use?
A.loancustomersDataSet.Merge(assetCustomersDataSet)
B.loancustomersDataSet.Merge(assetCustomersDataSet, True)
C.assetCustomersDataSet.Merge(loancustomersDataSet)
D.assetCustomersDataSet.Merge(1oanCustomersDataSet, True)
开始考试点击查看答案 - 4You have a DataSet object named YourDataSet. This object contains two DataTable objects named Customers and Orders. Customers has a column named CustomerlD, which is unique to each customer. Orders also has a column named CustomerlD.You want to use the GetChildRows method of the DataRow object to get all orders for the current customers.What should you do?
A.Add a foreign key constraint on CustomerlD of Orders between Customers and Orders
B.Add a data relation to YourDataSet on OrderlD between Customers and Orders
C.Create a unique constraint on CustomerlD of Customers
D.Create a primary key on CustomerlD of Customers
开始考试点击查看答案 - 5You are developing an application that queries a Microsoft SQL Server database. The application will package the results of the query as XML dat
A.The XML data will be retrieved directly from the database and transmitted electronically to a business partner.The query must retrieve all rows and all columns from a database table named Customers.Which query should you use?A.SELECT * FROM Customers FOR XML AUTO
B.SELECT * FROM XML FROM Customers
C.SELECT * FROM Customers as XMLDATA
- 6You are using Visual Studio .NET to develop an application. You have a common business logic component that was created in COM that you want to use until you can replace it with Visual Studio .NET code.You create the Visual Studio .NET solution for the new application. You want to use the COM component in your Visual Studio .NET solution. What should you do?
A.Register the COM component by using Regsvr32.exe
B.Run the Type Library Exporter (Tlbexp.exe) and pass the COM component as the filename parameter
C.Use Visual Studio .NET to add a reference to the COM component
D.Run the Assembly Registration tool(Regasm.exe) and pass theCOM component as the filename parameter
开始考试点击查看答案 - 7You are using Visual Studio .NET to develop a new application to replace an older COM-based application. The new application will use some of the old COM components until they can be replaced by Visual Studio .NET code.Your application uses a COM DLL named OurCOM.dll. The Visual Studio.NET assembly for 0urC0M.dll must be named OurDotNetCOM. You must use the name "ProjectX" for the namespace of the COM components . You must ensure that your application uses these naming guidelines. What should you do?
A.Reference OurCOM.dll from Visual Studio .NET.Change the assembly name in Solution Explorer.Change the namespace name by editing the assembly
B.Reference OurCOM.dll from Visual.NET.Change the assembly name in Solution Explorer. Change the namespace name by using the Namespace property of a Code- Name space Import object
C.Run the Type Library Importer (Tlbimp.exe) with the /namespace and/out options to create the assembly
D.Run the Type Library Importer (Tlbimp. exe) with the /out option to create the assembly. Change the namespace by using the Namespace property of a CodeNamespaceImport object
开始考试点击查看答案 - 8You are creating a serviced component named CTComponent that will be distributed to your customers. You are also creating a setup project that will register the component in the global assembly cache on each customer’s computer.You anticipate that there will be future updates to CTComponent that you will provide to your customers. All updates to CTComponent will be backward compatible. You will create similar setup projects for each update of CTComponent that will register the updated assembly in the global assembly cache.You need to ensure that any applications on your customers ' computer that reference CTComponent use the most recent version of the component.Which actions should you take? (Choose all that apply)
A.Sign CTComponent by using a strong name
B.Compile CTComponent as a satellite assembly
C.Include a publisher policy file that is registered in the global assembly cache on your customer's computers
D.Increment the assembly version for each update of CTComponent
E.Add an application configuration file to CTComponent that includes assembly binding information that redirects priorversions to the updated version。
开始考试点击查看答案 - 9You create three Windows services named SRI, SR2, and SR3. You want to install all three services on a computer named Computer1 by using the Installer tool (Installutil.exe).On the command line of Computer1, you enter and run the following command: Installutil SRI SR2 SR3During the installation process, SR3 throws an installation error. The installation process completes.How many of the three services are now installed on Computer1?
A.None
B.One
C.Two
D.Three
开始考试点击查看答案 - 10You have a .NET Remoting object named Promotions. The Promotions class allows remote client applications to add new product promotions to an online catalog application. The Promotions class is an assembly file named Fabrikam.dll.You have an Internet Information Services (IIS) virtual directory named PromotionsObject. The Fabrikam. dl 1 file is in the Promo- tionsObjectbin directory. You want to host the Promotions class in IIS.What should you do?
A.Create a We
B.config file that includes the following code segment:
B. Create a Web.config file that includes the following code segment:C.Create a Web.config file that includes the following code segment:〈configuration〉〈system.runtime.remoting〉
开始考试点击查看答案〈formatter ref="soap"/>