adplus-dvertising
frame-decoration

Question

Which of the following statements are correct about Attributes used in C#.NET?

a.

If there is a custom attribute BugFixAttribute then the compiler will look ONLY for the BugFix attribute in the code that uses this attribute.

b.

To create a custom attribute we need to create a custom attribute structure and derive it from System.Attribute.

c.

To create a custom attribute we need to create a class and implement IAttribute interface in it.

d.

The CLR can change the behaviour of the code depending upon the attributes applied to it.

Posted under C# programming

Answer: (d).The CLR can change the behaviour of the code depending upon the attributes applied to it.

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of the following statements are correct about Attributes used in C#.NET?

Similar Questions

Discover Related MCQs

Q. Which of the following forms of applying an attribute is correct?

Q. Which of the following correctly describes the contents of the filename AssemblyInfo.cs?

Q. It possible to create a custom attribute that can be applied only to specific programming element(s) like ____ .

Q. Which of the following CANNOT be a target for a custom attribute?

Q. Once applied which of the following CANNOT inspect the applied attribute?

Q. Which of the following is the correct way to apply an attribute to an Assembly?

Q. Attributes can be applied to
1. Method
2. Class
3. Assembly
4. Namespace
5. Enum

Q. Select the class which is the base class for all arrays in C#?

Q. Select the interfaces implemented by array class:

Q. Choose the correct statement about the IComparer interface in C#:

Q. Choose the correct statement about the IComparer interface in C#:

Q. What does the following property defined in the array class defines in C#?

public bool IsReadOnly { get; }

Q. What does the following property define in C#?

public static int BinarySearch<T>(T[] array, int index, int length, T value)

Q. Which method will be used to copy content from one array to another array?

Q. Which mechanism among the following helps in identifying a type during the execution of a program?

Q. Select the statement which are correct about RTTI(Runtime type identification):

Q. Select the Keyword which supports the run time type identification:

Q. What does the following code signify?

expr is type

Q. Which operator among the following supports the operation of conversion at runtime without generating the exceptions?

Q. Which operator among the following is used to perform the operation of boxing, unboxing, reference and identity conversions?