Which code segment should you insert at line 03?

You are developing a Silverlight 4 application. The application is hosted by using the Following HTML element.
<object data=”data:application/xsilverlight2,” type=”application/xsilverlight2″ width=”100%” height=”100%”>
<param name=”source” value=”ClientBin/MyApp.xap”/>
<param name=”onError” value=”onSilverlightError” />
<param name=”background” value=”white” />
<param name=”minRuntimeVersion” value=”4.0.50401.0″ />
<param name=”autoUpgrade” value=”true” />
<param name=”initParams” value=”InitKey=<%=Session[“modKey”] %>” />
</object>
The App.xaml.cs file contains the following code segment. (Line numbers are included for reference only.)

01 private void Application_Startup(object sender, StartupEventArgs e)
02 {
03
04 }

You need to retrieve the value of the modKey session variable in the Startup event handler.
Which code segment should you insert at line 03?

You are developing a Silverlight 4 application. The application is hosted by using the Following HTML element.
<object data=”data:application/xsilverlight2,” type=”application/xsilverlight2″ width=”100%” height=”100%”>
<param name=”source” value=”ClientBin/MyApp.xap”/>
<param name=”onError” value=”onSilverlightError” />
<param name=”background” value=”white” />
<param name=”minRuntimeVersion” value=”4.0.50401.0″ />
<param name=”autoUpgrade” value=”true” />
<param name=”initParams” value=”InitKey=<%=Session[“modKey”] %>” />
</object>
The App.xaml.cs file contains the following code segment. (Line numbers are included for reference only.)

01 private void Application_Startup(object sender, StartupEventArgs e)
02 {
03
04 }

You need to retrieve the value of the modKey session variable in the Startup event handler.
Which code segment should you insert at line 03?

A.
var moduleKey = e.InitParams[“modKey”];

B.
var moduleKey = e.InitParams[“InitKey”];

C.
var moduleKey = e.InitParams.Select(kvp => kvp.Key == “modKey”).ToString();

D.
var moduleKey = e.InitParams.Select(kvp => kvp.Key == “InitKey”).ToString();



Leave a Reply 0

Your email address will not be published. Required fields are marked *