Become a GOLD member of Deccansoft and get access to 40+ courses!!
NewBatches/Webinars
Packages
Gold Membership
Bestseller
Microsoft Azure Suite & Suite Plus
Power Platform Acadamy
New
Azure DevOps Expert & Expert Plus
MS.NET Foundation For Beginners
MS.NET Full Stack Developer
UI / Web Development
SQL Server & MSBI Tools
Software Testing
Courses
MS.NET Courses (Includes Live Project)
Complete C#, OOPs and Windows Programing
ASP.NET MVC Online Training
ASP.NET WebForms
ASP.NET Core
WCF incl. Web Services and Remoting
WPF incl. MVVM and Prism
LINQ and Entity Framework
Live Project Training for Developing Enterprise Application
Live Project using Ntier Arch (.NET5 + EF Core + Angular)
Microservices using .NET Core
Gold Membership
CareerStep IT Program
Client-side UI Technologies
Building Static Web Pages using HTML and CSS
JavaScript and HTML DOM
jQuery, AJAX and JSON
Building Interactive Web Pages using HTML5 and CSS3
BootStrap + Live Examples
AngularJS + Live Project
Angular + Typescript
ReactJS
KnockoutJS
Xamarin
SQL Server + MSBI
SQL Server 2017
Querying Data with Transact-SQL(70-761)
SQL Server Integration Service (SSIS)
SQL Server Reporting Service (SSRS)
SQL Service Analysis Service (SSAS)
Cloud Computing / Azure / AWS
AZ-900: Microsoft Azure Fundamentals
Azure Suite (AZ-104+AZ-204+AZ-305+ AZ-500)
AZ-104: Microsoft Azure Administrator
AZ-204: Developing Solutions for Microsoft Azure
AZ-305: Microsoft Azure Architect Technologies and Design
DP-203: Data Engineering on Microsoft Azure
Amazon Web Services (AWS)
DevOps Expert
AZ-400: Microsoft Azure DevOps
Docker by Sandeep Soni
Kubernetes by Sandeep Soni
Docker & Kubernetes by Rahul Rampurkar
IaC Using Terraform
Powershell
Microsoft Power Platform
Microsoft Power Platform
Data Analytics using PowerBI (DA-100)
Testing Tools
Manual Testing
Selenium Testing with Java(Live Training)
Others
Python Programming
C and Data Structure
Core Java
OOPs and C++
Advance Java
Complete Azure Training
Pricing
Videos
Testimonials
Azure Certification
Contact Us
Login
Login or Register
×
Sign In
Register
Forgot Password?
How did you find us
WhatsApp
YouTube
LinkedIn
Facebook
Telegram
Twitter
Google
Referred by Friend
Refresh
Input symbols
By clicking Register, you accept to the
terms and conditions
and that you have read our
privacy policy.
Recover Password
×
Submit
Enquiry Now
Where did you come to know about us
WhatsApp
YouTube
LinkedIn
Facebook
LinkedIn Ad
Email
Twitter
Google
Referred
Other
Refresh
Input symbols
Reflection And Attributes
Interview Questions and Answer
1. Which feature enables to obtain information about the use and capabilities of types at runtime?
Options:
a. Runtime type ID
b. Reflection
c. Attributes
d. None of the mentioned
Reveal Answer
2. Choose the namespace which consists of classes that are part of .NET Reflection API:
Options:
a. System.Text
b. System.Name
c. System.Reflection
d. None of the mentioned
Reveal Answer
3. Choose the correct statement about System.Type namespace:
Options:
a. Core of the reflection subsystem as it encapsulates a type
b. Consists of many methods and properties that can be used to obtain information about a type at runtime
c. Both a & b
d. Only b
Reveal Answer
4. Choose the class from which the namespace ‘System.Type’ is derived:
Options:
a. System.Reflection
b. System.Reflection.MemberInfo
c. Both a & b
d. None of the mentioned
Reveal Answer
5. What does the following property signify?
Options:
a. Helps in distinguishing kinds of members
b. Property helps in determining if member is a field, method, property or event
c. Both a & b
d. None of the mentioned
Reveal Answer
6. The property signifies “Obtains a Module object that represents the module (an executable file) in which the reflected type resides”. Choose the property which
Options:
a. Type DeclaringType
b. int MetadataToken
c. Module Module
d. Type ReflectedType
Reveal Answer
7. Choose the method defined by MemberInfo:
Options:
a. GetCustomAttributes()
b. IsDefined()
c. GetCustomeAttributesData()
d. All of the mentioned
Reveal Answer
8. What does the following declaration specify? MethodInfo[] GetMethods()
Options:
a. Returns an array of MethodInfo objects
b. Returns a list of the public methods supported by the type by using GetMethods()
c. Both a & b
d. None of the mentioned
Reveal Answer
9. What does the following code specify? object Invoke(object obj, object[] parameters)
Options:
a. Calling a type using invoke()
b. Any arguments that need to be passed to the method are specified in the array parameters
c. The value returned by the invoked method is returned by Invoke()
d. None of the mentioned
Reveal Answer
10. What does the following method specify? Type[] GetGenericArguments()
Options:
a. a property defined by MemberInfo
b. Obtains a list of the type arguments bound to a closed constructed generic type
c. the list may contain both type arguments and type parameters
d. Only b & c
Reveal Answer
11. Which of the following cannot further inspect the attribute that is once applied?
Options:
a. Linker
b. ASP.NET Runtime
c. Language compilers
d. CLR
Reveal Answer
12. To apply an attribute to an Assembly, the correct way of implementation is?
Options:
a. [AssemblyInfo: AssemblyDescription (“Csharp”)]
b. [assembly: AssemblyDescription(“Csharp”)]
c. [AssemblyDescription(“Csharp”)]
d. (Assembly:AssemblyDescription(“Csharp”)]
Reveal Answer
13. The correct method to pass parameter to an attribute is?
Options:
a. By name
b. By address
c. By position
d. By reference
Reveal Answer
14. Which among the following is the correct form of applying an attribute?
Options:
a. class sample { }
b. (Serializable())class sample { }
c. [Serializable()] class sample { }
d. none
Reveal Answer
15. Which among the following cannot be a target for a custom attribute?
Options:
a. Enum
b. Event
c. Interface
d. Namespace
Reveal Answer
16. Select the correct statement about Attributes used in C#.NET?
Options:
a. The CLR can change the behaviour of the code depending on attributes applied to it
b. If a bugFixAttribute is to recieve three paramteres, then the BugFixAttribute class should implement a zero arguement constructor
c. To create a custom attribute we need to create a custom attribute structure and derive it from System.Attribute
d. None of the mentioned
Reveal Answer
17. The correct way to apply the custom attribute called Employer which receives two arguements – name of the employee and employeeid is?
Options:
a. Custom attribute cannot be applied to an assembly
b. [assembly : Employer(“Ankit”,employeeid.one)]
c. [ Employer(“Ankit”, employeeid.second)] class employee { }
d. Custom attribute cannot be applied to a class
Reveal Answer
18. Which of the following is the correct statement about inspecting an attribute in C#.NET?
Options:
a. An attribute can be inspected at link time
b. An attribute can be inspected at design time
c. An attribute can be inspected at run time
d. None of the mentioned
Reveal Answer
19. Attributes could be applied to
Options:
a. Method
b. Class
c. Assembly
d. Enum
Reveal Answer
20. The [Serializable()] attributes gets inspected at:
Options:
a. compile time
b. run time
c. design time
d. linking time
Reveal Answer
Packages
Gold Membership
Microsoft Azure Suite &Suite Plus
Azure DevOps Expert &Expert Plus
MS.NET Foundation For Beginners
MS.NET Full Stack Developer
UI / Web Development
SQL Server & MSBI Tools
Software Testing
Resources
Blog
Deccansoft
AzureA2Z
Wall of Fame
On-Job Tech Support
About
About BestDotNetTraining
About Trainer
Testimonials
FAQ
Other links
About Us
Contact Us
Leave us a feedback
Sitemap
Privacy Policy
Terms & Conditions
Proudly Powered by