You need to create a class definition that is interoperable 

题目
单选题
You need to create a class definition that is interoperable along with COM.You need to ensure that COM applications can create instances of the class and can call the GetAddress method. Which code segment should you use?()
A

A

B

B

C

C

D

D

参考答案和解析
正确答案: A
解析: 暂无解析
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

You work as an application developer at Certkiller .com. Certkiller .com has been hired by a small local private school to develop a class library that will be used in an application named ManageAttendance for the purpose of managing student records.You are responsible for developing this class library. Certkiller .com has instructed you to create a collection in the application to store learners’ results. The school has informed you that they currently only have seven learners, but that this value will triple in the following year. Due to the limited resources, you need to ensure that the collection you create consumes a minimum amount of resources. What should you use to create the collection?()

  • A、 The HybridDictionary collection class.
  • B、 The HashTable collection class.
  • C、 The ListDictionary collection class.
  • D、 The StringCollection collection class.

正确答案:A

第2题:

You create an application. The application processes hundreds of XML documents per minute. The XML documents are validated against inline schemas. You need to load XML documents from the file system and read them as quickly as possible. XML comments must be ignored while reading the XML documents.What should you do? ()

  • A、Create an instance of the XmlReader class by using the XmlReader Create method with an instance of the XmlReaderSettings class.
  • B、Create an instance of the XmlReader class with an instance of the XmlTextReader class.
  • C、Create an instance of the XmlDocument class and specify a location for the application schema.
  • D、Create an instance of the XmlReader class with an instance of the XmlNodeReader class.

正确答案:A

第3题:

You have recently created a serializable class named Vehicle.The class is shown below:[Serializable]public class Vehicle{public string VIN;public string Make;public string Model;public string Year;}You are planning to create a custom formatter class to control the formatting of Vehicle objects when they are serialized.You need to ensure that is achieved with as little development effort as possible.What should you do?()

A.

B.

C.

D.


参考答案:D

第4题:

You create a server control that inherits from WebControl. You need to enable the server control to emit markup for a new kind of mobile device. You must not alter the code in the server controls. Which two actions should you perform?()

  • A、Create a class that inherits HtmlTextWriter and that can emit the new markup.
  • B、Create a class that inherits StreamWriter and that can emit the new markup.
  • C、Reference the class in the <capabilities> element of the new device's browser definition file.
  • D、Reference the class in the <controlAdapters> element of the new device's browser definition file.

正确答案:A,D

第5题:

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You add a property named ServiceContext to a control. You need the value of ServiceContext to flow to the child controls exactly like the value of the DataContext property of the FrameworkElement class. What should you do? ()

  • A、 Inherit the control class from the DependencyObject class.
  • B、 Register a dependency property.   In the options settings of the property metadata, specify the Inherits option.
  • C、 Declare a new property.   In the get and set methods of the new property, create an instance of the TraversalRequest class. 
  • D、 Declare a new property.   In the get method of the new property call VisualTreeHelper.GetParent.   In the set method of the new property, call VisualTreeHelper.GetChild.

正确答案:B

第6题:

In your web application,you need to execute a block of code whenever the session object is first created. Which design will accomplish this goal?()

  • A、Create an HttpSessionListener class and implement the sessionInitialized method with that block ofcode.
  • B、Create an HttpSessionActivationListener class and implement the sessionCreated method with thatblock of code.
  • C、Create a Filter class, call the getSession(false) method, and if the result was null, then execute that block of code.
  • D、Create an HttpSessionListener class and implement the sessionCreated method with that block of code.

正确答案:D

第7题:

You are creating a Windows Forms Application by using the .NET Framework 3.5.You plan to design a new control that will be used on multiple forms in the app.You need to ensure that the control meets the following requirement  (1)It retrieves data from a MSSQL Server 2008 database instance. (2)It uses WPF classes to display data.  (3)It uses user-customizable actions when the control is first painted on the form.   What should you do?()

  • A、Create a new custom class for the control that is derived from the Control class.
  • B、Create a new custom class for the control that is derived from the UserControl class.
  • C、Create a new custom class for the control that is derived from the ContentControl class.
  • D、Create a new custom class for the control that is derived from the ContentPresenter class.

正确答案:B

第8题:

You need to modify a client application that consumes a Windows Communication Foundation (WCF) service. The service metadata is no longer available. You need to modify the previously generated proxy to include asynchronous calls to the service.What should you do? ()

A. Update the service reference with the Generate asynchronous operations option.

B. Create a partial class for the previously generated proxy and include the new asynchronous methods.

C. Create a class with the same name as the previously generated proxy and add the new asynchronous methods. Add the new class to a namespace that is different from the original proxy.

D. Create a class with the same name as the previously generated proxy and add the new asynchronous methods as partial methods. Add the new class to a namespace that is different from the original proxy.


参考答案:B

第9题:

You design a Business Intelligence (BI) solution by using SQL Server 2008. You create a SQL Server 2008 Reporting Services (SSRS) solution. You create reports by using Microsoft Visual Studio .NET 2008. The development team of your company must create 50 SSRS reports. You need to ensure that the company logo and the company name are included in the page header of all the reports. What should you do?()

  • A、 Create an SSRS report and include the required page header in the report. Use the report as a template for all the reports.
  • B、 Create an SSRS report and include the required page header in the report. Create a subreport that refers to the report. Include the subreport to all the reports.
  • C、 Create a SSRS report and include the required page header in the report. Copy the report definition to an XML file.Add the XML file as a data source for all the reports.
  • D、 Create a SSRS report and include the required page header in the report. Create a class library that includes the report.Add the class library as an assembly reference for all the reports.

正确答案:A

第10题:

You are developing a custom-collection class.You need to create a method in your class. You need to ensure that the method you create in your class returns a type that is compatible with the Foreach statement. Which criterion should the method meet?()

  • A、The method must return a type of either IEnumerator or IEnumerable.
  • B、The method must return a type of IComparable.
  • C、The method must explicitly contain a collection.
  • D、The method must be the only iterator in the class.

正确答案:A

更多相关问题