.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> .NET Framework >> Post New QuestionBookmark and Share Subscribe to Forum

What is Reflection? When to use Reflection?

Posted By: Ramesh     Posted Date: December 17, 2009    Points:2   Category :.NET Framework
Hi,

I am Bit confused with concept of Reflection in .Net Framework? When to use Reflection?

Regards
Ramesh

Responses
Author: Prasanti Prusty             
Posted Date: December 18, 2009     Points: 5   

Hi Ramesh,

Chk the following link.

http://knowledgeparlour.blogspot.com/2009/12/reflection.html

Regards,
Prasanti
Author: nishithraj             
Posted Date: December 18, 2009     Points: 5   

The System.Reflection namespace contains classes and interfaces that provide a managed view of loaded types, methods, and fields, with the ability to dynamically create and invoke types.

For example, System.Reflection.Assembly can be used to create run time assembly parameters

Author: Abhisek Panda             
Posted Date: December 22, 2009     Points: 5   
Author: Jegan R             
Posted Date: November 01, 2010     Points: 5   

All .NET compilers produce metadata about the types defined in the modules they produce. This metadata is packaged along with the module (modules in turn are packaged together in assemblies), and can be accessed by a mechanism called reflection. The System.Reflection namespace contains classes that can be used to interrogate the types for a module/assembly.
Using reflection to access .NET metadata is very similar to using ITypeLib/ITypeInfo to access type library data in COM, and it is used for similar purposes - e.g. determining data type sizes for marshaling data across context/process/machine boundaries.
Reflection can also be used to dynamically invoke methods (see System.Type.InvokeMember ) , or even create types dynamically at run-time (see System.Reflection.Emit.TypeBuilder).




Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend