单选题You are developing an ASP.NET Web page that will display the median value from a sequence of integer values. You need to create an extension method to compute the median value. Which interface should you add the extension method to?()A  IComparerTB  IE

题目
单选题
You are developing an ASP.NET Web page that will display the median value from a sequence of integer values. You need to create an extension method to compute the median value. Which interface should you add the extension method to?()
A

 IComparer<T>

B

 IEnumerable<T>

C

 IEnumerator<T>  

D

 IEqualityComparer<T>

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

You are developing a Web control. The Web control captures user address information in a Web application. You create a class named AddressControl that inherits from CompositeControl. This control consists of child controls.You need to ensure that the child controls are properly output to the browser.Developers using your control must be able to set the appropriate text for labels. In addition, they must be able to pull user address information from the associated text boxes during postback. What should you do?()

  • A、Override the EnsureChildControls method of the base class. Add the child controls to the base container.
  • B、Override the CreateControlCollection method of the base class. Add the child controls to the ControlCollection class
  • C、Override the CreateChildControls method of the base class. Add the child controls to the base container.
  • D、Override the DataBindChildren method of the base class. Add the child controls to the ControlCollection class.

正确答案:C

第2题:

You are creating an ASP.NET Web site. The site has a master page named Custom.master. The code-behind file for Custom.master contains the following code segment.Partial Public Class Custom  Inherits System.Web.UI.MasterPagePublic Property Region As String    Protected Sub Page_Load(ByVal sender As Object,ByVal e As System.EventArgs) Handles Me.LoadEnd SubEnd Class You create a new ASP.NET page and specify Custom.master as its master page.You add a Label control named lblRegion to the new page.  You need to display the value of the master pages Region property in lblRegion.What should you do? ()

  • A、Add the following code segment to the Page_Load method of the page code-behind file. Dim custom As Custom = Me.Parent  lblRegion.Text = custom.Region
  • B、Add the following code segment to the Page_Load method of the page code-behind file. Dim custom As Custom = Me.Master  lblRegion.Text = custom.Region
  • C、Add the following code segment to the Page_Load method of the Custom.Master.vb code-behind file. Dim lblRegion As Label = Page.FindControl("lblRegion") lblRegion.Text = Me.Region
  • D、Add the following code segment to the Page_Load method of the Custom.Master.vb code-behind file. Dim lblRegion As Label = Master.FindControl("lblRegion") lblRegion.Text = Me.Region

正确答案:B

第3题:

You are developing a Windows Presentation Foundation (WPF) application. You need to display HTML content from a Web Page on the WPF form. What should you do?()

  • A、 Add a FlowDocumentReader control to the design surface. Then create a FlowDocument control.
  • B、 Add a ContentControl control to the design surface. The reference a WebClient object to return an HTML string.
  • C、 Add a DocumentViewer control to the design surface. The create a FixedDocument control.

正确答案:C

第4题:

You are developing an ASP.NET Web page. The page includes a List instance. You add a FormView control to display a single Product from this list. You need to bind the list to the FormView control. Which FormView property should you set in the code-behind file?()

  • A、DataSource
  • B、DataSourceID
  • C、DataKeyNames
  • D、DataMember

正确答案:A

第5题:

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

第6题:

You are developing an ASP.NET Dynamic Data Web application. Boolean fields must display as Yes or No instead of as a check box. You replace the markup in the default Boolean field template with the following markup.You need to implement the code that displays Yes or No. Which method of the FieldTemplateUserControl class should you override in the BooleanField class?()

  • A、OnLoad
  • B、Construct
  • C、OnDataBinding
  • D、SaveControlState

正确答案:C

第7题:

You are implementing an ASP. NET MVC 2 Web application. You add a controller named Company Controller. You need to modify the application to handle the URL path /company/info. Which two actions should you perform?()

  • A、Add the following method to the CompanyController class. Function Info() As ActionResult   Return View() End Function
  • B、Add the following method to the CompanyController class. Function Company_Info() As ActionResult  Return View() End Function
  • C、Right-click the Views folder, and select View from the Add submenu to create the view for the action.
  • D、Right-click inside the action method in the CompanyController class, and select Add View to create a view for the action

正确答案:A,D

第8题:

You are deploying an ASP.NET Web application to a remote server. You need to choose a deployment method that will ensure that all IIS settings, in addition to the Web content, will deploy to the remote server. Which deployment method should you choose?()

  • A、the XCOPY command-line tool
  • B、the Copy Web Site tool
  • C、the Web Deployment tool
  • D、the Publish Web Site utility

正确答案:C

第9题:

You are developing an ASP.NET Web application. You create a master page. The master page requires a region where you can add page-specific content by using the ASP.NET page designer.  You need to add a control to the master page to define the region. Which control should you add?()

  • A、Content
  • B、ContentPlaceHolder
  • C、PlaceHolder
  • D、Substitution

正确答案:B

第10题:

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. The application must redirect the original URL to a different ASPX page.  You need to ensure that the users cannot view the original URL after the page is executed. You also need to ensure that each page execution requires only one request from the client browser. What should you do?()

  • A、Use the Server.Transfer method to transfer execution to the correct ASPX page.
  • B、Use the Response.Redirect method to transfer execution to the correct ASPX page.
  • C、Use the HttpContext.Current.RewritePath method to transfer execution to the correct ASPX page.
  • D、Add the Location: new URL value to the Response.Headers collection. Call the Response.End() statement. Send the header to the client computer to transfer execution to the correct ASPX page.

正确答案:C

更多相关问题