1. | Which of the following cannot further inspect the attribute that is once applied? |
Discuss |
Answer: (a).Linker
|
2. | To apply an attribute to an Assembly, the correct way of implementation is? |
Discuss |
Answer: (b).[assembly: AssemblyDescription(“Csharp”)].
|
3. | The correct method to pass parameter to an attribute is? |
Discuss |
Answer: (a).By name
|
4. | Which among the following is the correct form of applying an attribute? |
Discuss |
Answer: (c).[Serializable()] class sample
{ } |
5. | Which among the following cannot be a target for a custom attribute? |
Discuss |
Answer: (d).Namespace
|
6. | Select the correct statement about Attributes used in C#.NET? |
Discuss |
Answer: (a).The CLR can change the behaviour of the code depending on attributes applied to it
|
7. | The correct way to apply the custom attribute called Employer which receives two arguements – name of the employee and employeeid is? |
Discuss |
Answer: (d).All of the mentioned
|
8. | Which of the following is the correct statement about inspecting an attribute in C#.NET? |
Discuss |
Answer: (a).An attribute can be inspected at link time
|
9. | Attributes could be applied to |
Discuss |
Answer: (d).All of the mentioned
|
10. | The [Serializable()] attributes gets inspected at: |
Discuss |
Answer: (b).run time
|