Software job search
.net sql interview questions
  The best place for technical interview questions

 
Home.netSql serverAsp.netC#Vb.netAdo.netAjaxMcpd dumpsWord count tool
MCPD practice exams - 70-562 - Microsoft .NET Framework 3.5, ASP.NET Application Development - question 675
MCPD - 70-562 - Microsoft .NET Framework 3.5, ASP.NET Application Development - question no 675
Question. You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You create a custom control named OrderForm.
You write the following code segment.
Public Delegate Sub CheckOrderFormEventHandler(e As EventArgs)
Private Shared ReadOnly CheckOrderFormKey As New Object()
Public Custom Event CheckOrderForm As CheckOrderFormEventHandler
AddHandler(ByVal value As CheckOrderFormEventHandler)
Events.[AddHandler](CheckOrderFormKey, value)
End AddHandler
RemoveHandler(ByVal value As CheckOrderFormEventHandler)
Events.[RemoveHandler](CheckOrderFormKey, value)
End RemoveHandler
End Event
You need to provide a method that enables the OrderForm control to raise the CheckOrderForm event.
Which code segment should you use?
   







A. Protected Overridable Sub OnCheckOrderForm(e As EventArgs)
Dim checkOrderForm As CheckOrderFormEventHandler = DirectCast(Events(GetType
(CheckOrderFormEventHandler)), CheckOrderFormEventHandler)
RaiseEvent checkOrderForm(e)
End Sub
B. Protected Overridable Sub OnCheckOrderForm(e As EventArgs)
Dim checkOrderForm As CheckOrderFormEventHandler = TryCast(Events(CheckOrderFormKey),
CheckOrderFormEventHandler)
RaiseEvent checkOrderForm(e)
End Sub
C. Private checkOrderForm As New CheckOrderFormEventHandler(checkOrderFormCallBack)
Protected Overridable Sub OnCheckOrderForm(e As EventArgs)
RaiseEvent checkOrderForm(e)
End Sub
D. Private checkOrderForm As New CheckOrderFormEventHandler(checkOrderFormCallBack)
Protected Overridable Sub OnCheckOrderForm(e As EventArgs)
If checkOrderForm IsNot Nothing Then
RaiseBubbleEvent(checkOrderForm, e)
End If
End Sub
 Rate this question
     
 17 votes , average 3 out of 5

Next Question


Reader's opinions -

No comments
Loading

 
.net interview questions
Asp.net interview questions
C# interview questions
Vb.net interview questions
Ado.net interview questions
Ajax interview questions
Wcf interview questions
Wpf interview questions
.net threading interview questions
.net remoting and webservices interview questions
.net caching interview questions
.net oops interview questions
Sharepoint interview questions
Jquery interview questions
Silverlight interview questions
Linq interview questions
Wwf interview questions
Java interview questions
Sql server interview questions
Ssis interview questions
Ssrs interview questions
Data warehousing interview questions
Data mining interview questions
Oracle interview questions
Php interview questions
Design patterns interview questions
Uml interview questions
Mcpd dumps
Pmp practice tests

This site is best viewed with Internet Explorer 7.0 or higher, Firefox 2.0 or higher, Chrome at a minimum screen resolution of 1024x768.
A complete solution to interview questions
free matrimonial website      
web hosting plans |  compare vps hosting plans |  Compare dedicated hosting plans |  Compare linux hosting plans |  Compare cloud hosting plans |  Compare windows hosting plans | 
Hosting reviews |  GoDaddy reviews | 
Support Wikipedia