Sunday, June 16, 2013

Reflection-The Introduction

Introduction


Reflection is the way of showing and then examine something and to modify something as per need. In programming, it is the ability of a program to examine and modify the structure and behaviour of a programmable object at runtime.

It is widely used in statically typed programming language such as Java, C# etc.

In C#, it allows inspection of classes, interfaces and methods at runtime without knowing the names of the classes, interfaces, methods and fields at compile time. It also helps in instantiation of new objects and invocation of methods. Reflection is often used as a part of software testing. It can also be used to create applications called type browsers, which enable users to select types and then view the information about those types.

Fundamental

The System. Reflection namespace contains Type that retrieve information about loaded assemblies and its modules, members, parameters, and other entities in managed code by examining their metadata. Assemblies contains module and module contains types and types contains members. It provides objects that encapsulate assemblies, modules, and types. It is used to dynamically create an instance of a type, bind the type to an existing object and get the type from an existing object.

No comments:

Copyright © Codingnodes,2014.All Rights Reserved.