Reflection

11
REFLECTION http://melick-rajee.blogspot.com/

description

Basics of Reflection ..

Transcript of Reflection

Page 1: Reflection

REFLECTIONhttp://melick-rajee.blogspot.com/

Page 2: Reflection

Is a object

◦ Encapsulate assemblies

◦ Modules

◦ Types

Dynamically create instance

Reflection ?

Page 3: Reflection

Bind type to existing object in runtime

Get the type from an existing object

Invoke its methods

Access fields and properties

Access based on Attributes

Reflection ? ..

Page 4: Reflection

IF it is too much it is not good

Do not use reflection inside nested loops

Reflection is slows but ok to use

◦ Machines Performance◦ Memory Performance◦ Framework Improvement

Reflection Performance

Page 5: Reflection

Simple Reflection

Page 6: Reflection

Can Load Assemblies in Run Time

Simple Reflection ..

Page 7: Reflection

Dynamically Invoke Method

Path

Page 8: Reflection

Dynamically access Fields

Page 9: Reflection

Crate Custom Attribute

Page 10: Reflection

Access Custom Attributes

Page 11: Reflection

Thank You!