Sunday 25 March 2012

Test Number:2 Topics :Assembly, Event, Delegates_exceptions

Topics :Assembly, Event, Delegates_exceptions
Test Number:2

1.____________ in C# always syntactically have a one-parameter constructor
a) static Class
b) Delegate
c) Static constructor
d) Destructor
2.Which type of  delegate used  to wrap more than one method?
a) static Method
b) Push Method
c) Multicast
d) None of above
3.An anonymous method is a block of code that is used as the parameter for the ________.
a) static Class
b) Delegate
c) Static constructor
d) Destructor

4.You can't have a jump statement (break, goto, or continue) in an_______  that has a target outside its own block.
a) Anonymous Method
b) Compare Method
c) Start Method
d) None of above

5._______code cannot be accessed inside an anonymous method.
a) managed
b) source
c) Unsafe
d) Intermediate Language

6.____ utility is used for creating public private key pair
a) gacutil
b) sn
c) ildasm
d) AL

7.Assembly' class comes from which namespace?
a)System.Assembly
b)System.Reflection
c)System.Assembly.collection
d)None of the above

8.Can assembly be stored across multiple files?
a)Yes
b)No

9. If you are using multicast delegates, you should be aware that the order in which methods chained to the same
 delegate will be called is formally _______.
a) at once
b) systamatically
c) by order of assignment
d) undefined
10.you can also utilize _______ as the communications medium between your objects.
a) delegate
b) events
c) threads
d) All of the above

11.______________ is the inbuilt delegate which is used to assign the handler (Button_Click) to the event (Click).
a) Event
b) Event Args
c) Event Handler
d) All of the above

12.Event Handler will take___________type parameters.
a) string,int
b) Event Args, string
c) object sender, EventArgs e
d) Event Args, double
13.What type of Delegate should return void?
a)Simple Delegate
b)Multicast
c)Threads
d)None of the above
14.What is the keyword used for creating user defined delegate?
a)Delegate
b)Event
c)Delegate Event
d)Delegate_Event
15.What would be the error, if the file cannot be found, in specific location?
a)FileNot Found
b)Complie time error
c)FileNotFoundException
d)All of the above
16.Which block is executed independent of exception thrown?
a)Try
b)Catch
c)Finally
d)All of the above
17.Which keyword is used to fire the user defined exception?
a)Try
b)Throw
c)Catch
d)Exception
18..NET runtime by default catch which exception?
a)System.Reflection
b)System.ExceptionHandling
c)System.Exception
d)System.Window.Exception

19.Which  property of exception class allow us to pinpint the location where excepion occures?
a)targesite
b)StackTrace
c)Message
d)location
19.What is the smallest unit of execution in .NET?
a)Multicast delegate
b)Assembly
c) Class
d)Event
20.Can assembly be stored across multiple files?
a)No
b)Yes.
21.Can multiple catch blocks be executed for a single try statement?
a)Yes
b)NO
22.Which command-line utility  is used to viewed the contents of the assembly
a)asp.net_regsql utility
b)Svc Utility
c)ILDASM  utility
d)Snk.exe utility
23.By default assembly will use ___________version
a)old
b)specific
c)newer version
d)None of the above
24.Assembly manifest contains ________________ that describes the assembly to common language runtime.
a)IL
b)Resources files
c)Metadata
d)BCL
25.Which assembly type  can be  shared  by multiple assembly in one machine
a) private
b) Shared
c)satellite
d)all of the above
26.which command-line utility  is used for creating Shared assembly
a)gacutil.exe utility
b)Svc Utility
c)ILDASM  utility
d)Snk.exe utility
27.______________allows you to build a single delegate that can point to methods returning
 class types related by classical inheritance
a)covariance
b)Events
c)contravariance
d)None of the above
28.__________ permits method with parameter type that are base type than declared in delegate
to be associated
a)Multicast
b)covariance
c)Contravarience
d)None of the above
29.How we Associate events with event handlers
a)+=
b)-=
c)Handels Keywords
d)Associate  keywords

No comments :