CMS专题

单选题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

题目
单选题
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.

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

第1题:

You are developing a Windows Service. The Windows Service will host a Windows Communication Foundation (WCF) service.The Windows Service class will inherit from ServiceBase.You need to ensure that the WCF service starts when the Windows Service is restarted.What should you do in the Windows Service class?()

A.

B.

C.

D.


参考答案:B

第2题:

You are developing a Windows Communication Foundation (WCF) service. The service configuration file has a element defined. You need to ensure that all security audit information, trace logging, and message logging failures are recorded.Which configuration segment should you add to the element?()

A.

B.

C.

D.


参考答案:C

第3题:

You are creating a class that performs complex financial calculations.The class contains a method named GetCurrentRate that retrieves the current interest rate and a variable named currRate that stores the current interest rate.You write serialized representations of the class.You need to write a code segment that updates the currRate variable with the current interest ratewhen an instance of the class is deserialized.Which code segment should you use?()

A.

B.

C.

D.


参考答案:D

第4题:

You are developing a Windows Communication Foundation (WCF) service. You need to enable security auditing for all events. What should you do?()

  • A、Set the serviceAuthorizationAuditLevel setting to Success and the messageAuthenticationAuditLevel setting to Success.
  • B、Set the messageAuthenticationAuditLevel setting to Success and the auditLogLocation setting to Application.
  • C、Set the serviceAuthorizationAuditLevel setting to SuccessAndFailure and the messageAuthenticationAuditLevel setting to SuccessAndFailure.
  • D、Set the messageAuthenticationAuditLevel setting to SuccessAndFailure and the auditLogLocation setting to Security.

正确答案:C

第5题:

You are developing a Windows Communication Foundation (WCF) service. The service operation takes a customer number as the only argument and returns information about the customer. The service requires a security token in the header of the message. You need to create a message contract for the service.Which code segment should you use?()

A.

B.

C.

D.


参考答案:D

第6题:

You are developing a new version of an existing message contract named CustomerDetailsVersion1. The new version of the message contract must add a Department field of type String to the SOAP header.You create a new class named CustomerDetailsVersion2 that inherits from CustomerDetailsVersion1. You need to ensure that all client applications can consume the service.Which code segment should you use?()

A.

B.

C.

D.


参考答案:A

第7题:

You are developing a Windows Communication Foundation (WCF) service.You must record all available information for the first 1,000 messages processed, even if they are malformed.You need to configure the message logging section of the configuration file.Which configuration segment should you use? ()

A.

B.

C.

D.


参考答案:A

第8题:

You are developing a Windows Communication Foundation (WCF) service. You enable logging in the configuration file.The opening tag is defined as follows.<messagelogging br="" logentiremessage="true"> logMalformedMessages="true"logMessagesAtServiceLevel="true"logMessagesAtTransportLevel="true"maxMessagesToLog="20">You need to ensure that logging is implemented so that only messages with SOAP headers are logged.What should you add to the filters element of the application configuration file?()

A.

B.

C.

D.


参考答案:C

第9题:

Windows Communication Foundation (WCF) service is self-hosted in a console application. The service implements the lTimeService service interface in the TimeService class.You need to configure the service endpoint for HTTP communication. How should you define the service and endpoint tags?()

A.

B.

C.

D.


参考答案:D

第10题:

You are developing a Windows Forms Application by using the .NET Framework 3.5.You plan to design a composite custom control for the application. You include a ListBox control has a property that provides the item count of  the ListBox control. You need to ensure that the property cannot be accessed at design time. Which attribute should you use?()

  • A、[Bindable(false)]
  • B、[DesignOnly(false)]
  • C、[EditorBrowsable(EditorBrowsableState.Never)]
  • D、[Browsable(false)]

正确答案:D

更多相关问题