Library tutorials & articles

Reflection in C#

Page 1 of 2
  1. Introduction
  2. An Example

Introduction

The ability to find out information about objects at run-time is called Reflection. In Reflection we can find out the object’s class, details of an object’s methods, and even create one dynamically at runtime. Reflection is a powerful mechanism with the System.Reflection namespace contains nearly forty classes and interface. The Type class is the root of all reflection operations and the Object that represents a type inside the system. Type is an abstract base class that allows multiple implementations.

This class is the primary means by which we can access metadata, and it acts as a gateway to the Reflection API. It provides methods for obtaining information about a type declaration, such as the constructors, methods, fields, properties, and events of a class, as well as the module and the assembly in which the class is deployed.

Comments

  1. 22 May 2007 at 13:10

    Nobody learn this at his borning,just obtain this from education and if he can handle the thing,so he shoul d it.But the most fascinating part is logic itself with  proofs,theorems,df,metha,and so on. That's why we have to present a subject in a theoretical form,to avoid expression like this.It is simple.

  2. 22 May 2007 at 13:01

    Yeh,there are many article which drive one concept or another .But the most fascinating thing is logics.

    Nobody is born whith all in it's mind(not even the mind code that is hash distribution,it's work well as we know) we obtain a sum of knowledge by education,and other tends to be our proper discover,The way in which logic states about sets proofs ,df,theo,corrl,meta's and so one.We look for many model of thinking ,some of them already implemented,other in reasearch phase.Writing about proper transformation is not something wrong,and become obvious that simple ideea has to be presented in

    theortical forms,and these theoretical forms should became a standard of prezentation in order to avoid affirmative.That is why we need to build logic theories and present them as should be presented.

    Or you can use upper like expresion, doesn't bother  important is communication

  3. 26 Jul 2006 at 17:04

    Is Microsoft the inventor of reflection ?

     

  4. 26 Jul 2006 at 17:00

    Excelent article.And well apreciated that you share your thoughts.

    Ctin Negut

  5. 12 Jul 2002 at 14:56

    Lame, this is stolen from the docs, even down to the poor formating micro$oft uses

  6. 01 Jan 1999 at 00:00

    This thread is for discussions of Reflection in C#.

Leave a comment

Sign in or Join us (it's free).

AddThis

Related podcasts

  • Looking into the C# Crystal Ball with Charlie Calvert and Bill Wagner

    One of the most exciting announcements from PDC was the news about C# 4.0 and Visual Studio 2010. With all the excitement and discussion throughout the event about these new developer tools, we reached out to two experts in the fields. Charlie Calvert and Bill Wagner sat down with Keith and Woody...

Events coming up

  • Dec 6

    Developing AJAX Web Applications with Castle Monorail

    London, United Kingdom

    Monorail is the model-view-controller engine of the Castle Project, bringing many of the best ideas of Ruby on Rails to the .NET world. In this talk, David De Florinier and Gojko Adzic show how Monorail makes it easy to develop .NET based AJAX applications, and how to use the Castle Project to build Web 2.0 applications effectively. Come to this session if you are a .NET web developer. Everyone is welcome!