C# Programming - Attributes - Discussion

Discussion :: Attributes - General Questions (Q.No.15)

15. 

Attributes can be applied to

  1. Method
  2. Class
  3. Assembly
  4. Namespace
  5. Enum

[A]. 1 and 2 only
[B]. 1, 2 and 3
[C]. 4 and 5 only
[D]. All of the above
[E]. None of the above

Answer: Option B

Explanation:

No answer description available for this question.

Pratyusha said: (Jun 23, 2014)  
Can attributes be applied to member variables?

Abcd said: (Sep 21, 2014)  
This isn't correct, for example the FlagsAttribute can be applied to an enum.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.