多做题,通过考试没问题!

微软认证考试

睦霖题库>其他计算机考试>微软认证考试

You are implementing an ASP.NET Web site. The site uses a component that must be dynamically configured before it can be used within site pages. You create a static method named SiteHelper.Configure that configures the component. You need to add a code segment to the Global.asax file that invokes the SiteHelper.Configure method the first time, and only the first time, that any page in the site is requested. Which code segment should you use? ()

  • A、void Application_Start(object sender, EventArgs e) { SiteHelper.Configure(); }
  • B、void Application_Init(object sender, EventArgs e) { SiteHelper.Configure(); }
  • C、void Application_BeginRequest(object sender, EventArgs e) { SiteHelper.Configure(); }
  • D、Object lockObject = new Object(); void Application_BeginRequest(object sender, EventArgs e) { lock(lockObject()) { SiteHelper.Configure(); } }
正确答案:A
答案解析:
进入题库查看解析

微信扫一扫手机做题