Live Help (Start Chat)
View Count: 0
Duration: 21 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 34 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 22 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 24 mins
Accessed date:
Not Yet Viewed
Post your comment / feedback here
 
 

Be the first one to comment about this video

Question No: 1 of 20
Which feature enables to obtain information about the use and capabilities of types at runtime? 
Options:
  1. Runtime type ID
  2. Reflection
  3. Attributes
  4. None of the mentioned
View Answer/Explanation:
b
Explanation:
Reflection is the feature that enables you to obtain information about a type. The term reflection comes from the way the process works: A Type object mirrors the underlying type that it represents. Reflection is a powerful mechanism because it allows us to learn and use the capabilities of types that are known only at runtime.

Question No: 2 of 20
Choose the namespace which consists of classes that are part of .NET Reflection API: 
Options:
  1. System.Text
  2. System.Name
  3. System.Reflection
  4. None of the mentioned
View Answer/Explanation:

Explanation:
Many of the classes that support reflection are part of the .NET Reflection API, which is in the System.Reflection namespace. Example: using System.Reflection;

Question No: 3 of 20
Choose the correct statement about System.Type namespace: 
Options:
  1. Core of the reflection subsystem as it encapsulates a type
  2. Consists of many methods and properties that can be used to obtain information about a type at runtime
  3. Both a & b
  4. Only b
View Answer/Explanation:
c
Explanation:
System.Type is at the core of the reflection subsystem because it encapsulates a type. It contains many properties and methods that you will use to obtain information about a type at runtime.

Question No: 4 of 20
Choose the class from which the namespace ‘System.Type’ is derived: 
Options:
  1. System.Reflection
  2. System.Reflection.MemberInfo
  3. Both a & b
  4. None of the mentioned
View Answer/Explanation:
b
Explanation:
Type is derived from an abstract class called System.Reflection.MemberInfo

Question No: 5 of 20
What does the following property signify? 
Options:
  1. Helps in distinguishing kinds of members
  2. Property helps in determining if member is a field, method, property or event
  3. Both a & b
  4. None of the mentioned
View Answer/Explanation:
c
Explanation:
This property obtains the kind of the member. This value indicates if the member is a field, method, property, event, or constructor among others.

Question No: 6 of 20
The property signifies “Obtains a Module object that represents the module (an executable file) in which the reflected type resides”. Choose the property which 
Options:
  1. Type DeclaringType
  2. int MetadataToken
  3. Module Module
  4. Type ReflectedType
View Answer/Explanation:
c
Explanation:

Question No: 7 of 20
Choose the method defined by MemberInfo: 
Options:
  1. GetCustomAttributes()
  2. IsDefined()
  3. GetCustomeAttributesData()
  4. All of the mentioned
View Answer/Explanation:
d
Explanation:
MemberInfo includes two abstract methods: GetCustomAttributes( ) and IsDefined( ). These both relate to attributes. The first obtains a list of the custom attributes associated with the invoking object. The second determines if an attribute is defined for the invoking object. The .NET Framework Version 4.0 adds a method called GetCustomAttributesData(), which returns information about custom attributes

Question No: 8 of 20
What does the following declaration specify?
MethodInfo[] GetMethods() 
Options:
  1. Returns an array of MethodInfo objects
  2. Returns a list of the public methods supported by the type by using GetMethods()
  3. Both a & b
  4. None of the mentioned
View Answer/Explanation:
a b
Explanation:
A list of the public methods supported by the type can be obtained by using GetMethods(). It returns an array of MethodInfo objects that describe the methods supported by the invoking type. MethodInfo is in the System.Reflection namespace.

Question No: 9 of 20
What does the following code specify?
object Invoke(object obj, object[] parameters) 
Options:
  1. Calling a type using invoke()
  2. Any arguments that need to be passed to the method are specified in the array parameters
  3. The value returned by the invoked method is returned by Invoke()
  4. None of the mentioned
View Answer/Explanation:
a b c
Explanation:
Here, obj is a reference to the object on which the method is invoked. (For static methods, you can pass null to obj.) Any arguments that need to be passed to the method are specified in the array parameters. If no arguments are needed, parameters must be null. Also, parameters must contain exactly the same number of elements as the number of arguments.

Question No: 10 of 20
What does the following method specify?
Type[] GetGenericArguments() 
Options:
  1. a property defined by MemberInfo
  2. Obtains a list of the type arguments bound to a closed constructed generic type
  3. the list may contain both type arguments and type parameters
  4. Only b & c
View Answer/Explanation:
a b c
Explanation:
The following method Obtains a list of the type arguments bound to a closed constructed generic type or the type parameters if the specified type is a generic type definition. For an open constructed type, the list may contain both type arguments and type parameters

  1