Attributes - General Questions Online Exam Quiz
Attributes - General Questions GK Quiz. Question and Answers related to Attributes - General Questions. MCQ (Multiple Choice Questions with answers about Attributes - General Questions
The [Serializable()] attribute gets inspected at
Options
A : Compile-time
B : Run-time
C : Design-time
D : Linking-time
Which of the following are correct ways to specify the targets for a custom attribute?
Options
A : By applying AttributeUsage to the custom attribute's class definition.
B : By applying UsageAttribute to the custom attribute's class definition.
C : Once an attribute is declared it applies to all the targets.
D : By applying AttributeUsageAttribute to the custom attribute's class definition.
Which of the following are correct ways to pass a parameter to an attribute?
Options
A : 1, 2
B : 1, 2, 3
C : 4, 5
D : All of the above
Which of the following statements are correct about inspecting an attribute in C#.NET?
Options
A : 1, 2
B : 3, 4
C : 1, 3, 4
D : All of the above
Which of the following is correct ways of applying an attribute?
Options
A : [WebService (Name = "IndiaBIX" , Description = "BIX WebService" )] class AuthenticationService: WebService { /* .... */ }
B : <WebService ( Name : "IndiaBIX" , Description : "BIX WebService" )> class AuthenticationService: inherits WebService { /* .... */ }
C : <WebService ( Name = "IndiaBIX" , Description = "BIX WebService" )> class AuthenticationService: extends WebService { /* .... */ }
D : [WebService ( Name := "IndiaBIX" , Description := "BIX WebService" )] class AuthenticationService: inherits WebService { /* .... */ }
Which of the following forms of applying an attribute is correct?
Options
A : < Serializable() > class sample { /* ... */ }
B : (Serializable()) class sample { /* ... */ }
C : [ Serializable() ] class sample { /* ... */ }
D : Serializablef) class sample { /* ... */ }
Which of the following statements are correct about Attributes in C#.NET?
Options
A : 1 and 2 only
B : 2 and 4 only
C : 1, 4 and 5 only
D : All of the above
Which of the following correctly describes the contents of the filename AssemblyInfo.cs?
Options
A : It contains method-level attributes.
B : It contains class-level attributes.
C : It contains assembly-level attributes.
D : It contains structure-level attributes.
It possible to create a custom attribute that can be applied only to specific programming element(s) like ____ .
Options
A : Classes
B : Methods
C : Classes and Methods
D : Classes, Methods and Member-Variables
Once applied which of the following CANNOT inspect the applied attribute?
Options
A : CLR
B : Linker
C : ASP.NET Runtime
D : Visual Studio.NET
Attributes - General Questions more Online Exam Quiz
Classes and Objects - General Questions
Collection Classes - General Questions