C# Programming - Attributes

Why should I learn to solve C# Programming questions and answers section on "Attributes"?

Learn and practise solving C# Programming questions and answers section on "Attributes" to enhance your skills so that you can clear interviews, competitive examinations, and various entrance tests (CAT, GATE, GRE, MAT, bank exams, railway exams, etc.) with full confidence.

Where can I get the C# Programming questions and answers section on "Attributes"?

IndiaBIX provides you with numerous C# Programming questions and answers based on "Attributes" along with fully solved examples and detailed explanations that will be easy to understand.

Where can I get the C# Programming section on "Attributes" MCQ-type interview questions and answers (objective type, multiple choice)?

Here you can find multiple-choice C# Programming questions and answers based on "Attributes" for your placement interviews and competitive exams. Objective-type and true-or-false-type questions are given too.

How do I download the C# Programming questions and answers section on "Attributes" in PDF format?

You can download the C# Programming quiz questions and answers section on "Attributes" as PDF files or eBooks.

How do I solve C# Programming quiz problems based on "Attributes"?

You can easily solve C# Programming quiz problems based on "Attributes" by practising the given exercises, including shortcuts and tricks.

Exercise : Attributes - General Questions
  • Attributes - General Questions
1.
The [Serializable()] attribute gets inspected at
Compile-time
Run-time
Design-time
Linking-time
None of the above
Answer: Option
Explanation:
No answer description is available. Let's discuss.

2.
Which of the following are correct ways to specify the targets for a custom attribute?
By applying AttributeUsage to the custom attribute's class definition.
By applying UsageAttribute to the custom attribute's class definition.
Once an attribute is declared it applies to all the targets.
By applying AttributeUsageAttribute to the custom attribute's class definition.
None of the above.
Answer: Option
Explanation:
No answer description is available. Let's discuss.

3.
Which of the following are correct ways to pass a parameter to an attribute?
  1. By value
  2. By reference
  3. By address
  4. By position
  5. By name
1, 2
1, 2, 3
4, 5
All of the above
Answer: Option
Explanation:
No answer description is available. Let's discuss.

4.
Which of the following statements are correct about inspecting an attribute in C#.NET?
  1. An attribute can be inspected at link-time.
  2. An attribute can be inspected at compile-time.
  3. An attribute can be inspected at run-time.
  4. An attribute can be inspected at design-time.
1, 2
3, 4
1, 3, 4
All of the above
None of the above
Answer: Option
Explanation:
No answer description is available. Let's discuss.

5.
Which of the following is correct ways of applying an attribute?
[WebService (Name = "IndiaBIX", Description = "BIX WebService")] 
class AuthenticationService: WebService
{ /* .... */}
<WebService ( Name : "IndiaBIX", Description : "BIX WebService" )> 
class AuthenticationService: inherits WebService
{ /* .... */}
<WebService ( Name = "IndiaBIX", Description = "BIX WebService" )> 
class AuthenticationService: extends WebService
{ /* .... */}
[WebService ( Name := "IndiaBIX", Description := "BIX WebService")] 
class AuthenticationService: inherits WebService
{ /* .... */}
Answer: Option
Explanation:
No answer description is available. Let's discuss.