SlideShare une entreprise Scribd logo
1  sur  16
.NET Attributes and Reflection “What a developer needs to know……” Presented By Dan Douglas      Blog: http://dandouglas.wordpress.com   Twitter: @Dan_Douglas   E-mail: dan.douglas@gmail.com
What are Attributes? A .NET Object Represents data you want to associate with a target within the assembly Many possible targets, including, Assembly, Class, Member, Constructor, Enum, Interface, and Event   Intrinsic Attributes (part of the CLR) Custom Attributes (developed)
…..Attributes Create a custom attribute by creating a class that inherits from System.Attribute Attributes are accessed by the application using reflection to get attribute information Useful to easily provide additional data to a target without having to write a lot of additional code
…..Attributes Multiple attributes can be assigned to a single target Many attributes in the System.ComponentModel namespace used by UI controls Provides information like Visibility, and Display Name
How to Specify an Attribute ,[object Object]
UI Controls such as grids or the PropertyGrid use this information,[object Object]
Reflection Usage In .NET View metadata within an assembly Type Discovery Look at types within an assembly and also be able to instantiate them and use them Late Binding Dynamically instantiate types Invoke properties and methods dynamically from dynamically instantiated classes Create your own types and IL at runtime using Reflection.Emit (advanced)
From a Technical Perspective… Reflection objects are available in the System.Reflection namespace Some of the classes available in the reflection namespace: Assembly ConstructorInfo MethodInfo
From a Technical Perspective… Some of the classes available in the reflection namespace: EventInfo PropertyInfo ParameterInfo CustomAttributeData
From a Technical Perspective… System.Reflection.Emit Namespace Advanced Level of Reflection Used in Very Specialized Scenarios Dynamically build assemblies and types Allows you to generate and execute.NET (IL-Intermediate Language) code on demand at runtime
Red Gate .NET Reflector Useful utility that uses reflection to get information about .NET assemblies  Allows you to view, navigate, and search through the class hierarchies of .NET assemblies  Look at the code behind the objects in .NET Framework classes or any .NET compiled components to see how they work Because reflection allows access to private members, these members are visible within .NET reflector (Demo - .NET Reflector)
Many Practical Uses….. Pluggable Application Architectures At runtime, load modules such as UI components into the application Business Objects Revertancel changes to a business object by cycling through its properties using reflection Quick and Dirty User Interfaces Get properties of a business object and add appropriate labels/text boxes to a form at runtime using property names
Reflection Performance Reflection is faster in .NET 2.0 and higher than it was in .NET 1.1  When using reflection on a server (ex: ASP.NET) special concern should be taken to ensure that performance won’t be impacted with much higher workloads In situations where you do not know the object at design time, use a standard interface when possible You can avoid  further reflection calls once you have a reference to the object by calling the methods of the interface Don’t avoid reflection due to performance concerns – rather use it where it makes sense
Demo….. Use reflection to dynamically load an assembly located outside of the project and access and invoke one its methods
Resources Hanselminutes Podcast #37 – Reflectionhttp://www.hanselminutes.com/default.aspx?showID=37 O’Reilly – Programming C# Chapter 18 (Attributes And Reflection)http://oreilly.com/catalog/progcsharp/chapter/ch18.html Dodge Common Performance Pitfalls to Craft Speedy Applicationshttp://msdn.microsoft.com/en-us/magazine/cc163759.aspx Real-world Reflection in .NEThttp://www.devx.com/dotnet/Article/31578/1954 My Blog (Dan Douglas) http://dandouglas.wordpress.com
Questions? Dan Douglas      Blog: http://dandouglas.wordpress.com   Twitter: @Dan_Douglas   E-mail: dan.douglas@gmail.com Consulting Inquiries? (519) 777-2258

Contenu connexe

Tendances

Lec 4 06_aug [compatibility mode]
Lec 4 06_aug [compatibility mode]Lec 4 06_aug [compatibility mode]
Lec 4 06_aug [compatibility mode]
Palak Sanghani
 
Entity Framework: Code First and Magic Unicorns
Entity Framework: Code First and Magic UnicornsEntity Framework: Code First and Magic Unicorns
Entity Framework: Code First and Magic Unicorns
Richie Rump
 
ADO.NET Entity Framework
ADO.NET Entity FrameworkADO.NET Entity Framework
ADO.NET Entity Framework
Doncho Minkov
 

Tendances (20)

C# Unit5 Notes
C# Unit5 NotesC# Unit5 Notes
C# Unit5 Notes
 
Lec 4 06_aug [compatibility mode]
Lec 4 06_aug [compatibility mode]Lec 4 06_aug [compatibility mode]
Lec 4 06_aug [compatibility mode]
 
.NET Core, ASP.NET Core Course, Session 9
.NET Core, ASP.NET Core Course, Session 9.NET Core, ASP.NET Core Course, Session 9
.NET Core, ASP.NET Core Course, Session 9
 
.NET Core, ASP.NET Core Course, Session 17
.NET Core, ASP.NET Core Course, Session 17.NET Core, ASP.NET Core Course, Session 17
.NET Core, ASP.NET Core Course, Session 17
 
Getting started with entity framework
Getting started with entity framework Getting started with entity framework
Getting started with entity framework
 
Java RMI
Java RMIJava RMI
Java RMI
 
Java chapter 3 - OOPs concepts
Java chapter 3 - OOPs conceptsJava chapter 3 - OOPs concepts
Java chapter 3 - OOPs concepts
 
Building maintainable web apps with Angular MS TechDays 2017
Building maintainable web apps with Angular MS TechDays 2017Building maintainable web apps with Angular MS TechDays 2017
Building maintainable web apps with Angular MS TechDays 2017
 
Entity Framework: Code First and Magic Unicorns
Entity Framework: Code First and Magic UnicornsEntity Framework: Code First and Magic Unicorns
Entity Framework: Code First and Magic Unicorns
 
.NET Core, ASP.NET Core Course, Session 5
.NET Core, ASP.NET Core Course, Session 5.NET Core, ASP.NET Core Course, Session 5
.NET Core, ASP.NET Core Course, Session 5
 
Understanding Annotations in Java
Understanding Annotations in JavaUnderstanding Annotations in Java
Understanding Annotations in Java
 
Namespaces in C#
Namespaces in C#Namespaces in C#
Namespaces in C#
 
dot NET Framework
dot NET Frameworkdot NET Framework
dot NET Framework
 
BCA IPU VB.NET UNIT-I
BCA IPU VB.NET UNIT-IBCA IPU VB.NET UNIT-I
BCA IPU VB.NET UNIT-I
 
Java annotations
Java annotationsJava annotations
Java annotations
 
Learn Entity Framework in a day with Code First, Model First and Database First
Learn Entity Framework in a day with Code First, Model First and Database FirstLearn Entity Framework in a day with Code First, Model First and Database First
Learn Entity Framework in a day with Code First, Model First and Database First
 
ADO.NET Entity Framework
ADO.NET Entity FrameworkADO.NET Entity Framework
ADO.NET Entity Framework
 
C#.net interview questions for dynamics 365 ce crm developers
C#.net interview questions for dynamics 365 ce crm developersC#.net interview questions for dynamics 365 ce crm developers
C#.net interview questions for dynamics 365 ce crm developers
 
Day3
Day3Day3
Day3
 
.NET and C# Introduction
.NET and C# Introduction.NET and C# Introduction
.NET and C# Introduction
 

En vedette

13 iec t1_s1_oo_ps_session_19
13 iec t1_s1_oo_ps_session_1913 iec t1_s1_oo_ps_session_19
13 iec t1_s1_oo_ps_session_19
Niit Care
 

En vedette (20)

Reflection in C#
Reflection in C#Reflection in C#
Reflection in C#
 
.NET Reflection
.NET Reflection.NET Reflection
.NET Reflection
 
Learning .NET Attributes
Learning .NET AttributesLearning .NET Attributes
Learning .NET Attributes
 
Attributes, reflection, and dynamic programming
Attributes, reflection, and dynamic programmingAttributes, reflection, and dynamic programming
Attributes, reflection, and dynamic programming
 
Reflection power pointpresentation ppt
Reflection power pointpresentation pptReflection power pointpresentation ppt
Reflection power pointpresentation ppt
 
C#/.NET Little Wonders
C#/.NET Little WondersC#/.NET Little Wonders
C#/.NET Little Wonders
 
Net remoting
Net remotingNet remoting
Net remoting
 
13 iec t1_s1_oo_ps_session_19
13 iec t1_s1_oo_ps_session_1913 iec t1_s1_oo_ps_session_19
13 iec t1_s1_oo_ps_session_19
 
Study research in April
Study research in AprilStudy research in April
Study research in April
 
CSharp Advanced L05-Attributes+Reflection
CSharp Advanced L05-Attributes+ReflectionCSharp Advanced L05-Attributes+Reflection
CSharp Advanced L05-Attributes+Reflection
 
Advanced c#
Advanced c#Advanced c#
Advanced c#
 
Session 6
Session 6Session 6
Session 6
 
Net remoting
Net remotingNet remoting
Net remoting
 
Smoke and Mirrors - Reflection in C#
Smoke and Mirrors - Reflection in C#Smoke and Mirrors - Reflection in C#
Smoke and Mirrors - Reflection in C#
 
Building & Designing Windows 10 Universal Windows Apps using XAML and C#
Building & Designing Windows 10 Universal Windows Apps using XAML and C#Building & Designing Windows 10 Universal Windows Apps using XAML and C#
Building & Designing Windows 10 Universal Windows Apps using XAML and C#
 
Day02 01 Advance Feature in C# DH TDT
Day02 01 Advance Feature in C# DH TDTDay02 01 Advance Feature in C# DH TDT
Day02 01 Advance Feature in C# DH TDT
 
.Net Core
.Net Core.Net Core
.Net Core
 
ASP.NET Core 1.0 Overview
ASP.NET Core 1.0 OverviewASP.NET Core 1.0 Overview
ASP.NET Core 1.0 Overview
 
C# Tutorial
C# Tutorial C# Tutorial
C# Tutorial
 
Session#1 csharp MTCS
Session#1 csharp MTCSSession#1 csharp MTCS
Session#1 csharp MTCS
 

Similaire à .NET Attributes and Reflection - What a Developer Needs to Know...

C# .NET Developer Portfolio
C# .NET Developer PortfolioC# .NET Developer Portfolio
C# .NET Developer Portfolio
cummings49
 
Patterns (contd)Software Development ProcessDesign patte.docx
Patterns (contd)Software Development ProcessDesign patte.docxPatterns (contd)Software Development ProcessDesign patte.docx
Patterns (contd)Software Development ProcessDesign patte.docx
danhaley45372
 
Bartlesville Dot Net User Group Design Patterns
Bartlesville Dot Net User Group Design PatternsBartlesville Dot Net User Group Design Patterns
Bartlesville Dot Net User Group Design Patterns
Jason Townsend, MBA
 
Object-oriented programming 3.pptx
Object-oriented programming 3.pptxObject-oriented programming 3.pptx
Object-oriented programming 3.pptx
Adikhan27
 
ActionScript 3.0 Fundamentals
ActionScript 3.0 FundamentalsActionScript 3.0 Fundamentals
ActionScript 3.0 Fundamentals
Saurabh Narula
 
VRE Cancer Imaging BL RIC Workshop 22032011
VRE Cancer Imaging BL RIC Workshop 22032011VRE Cancer Imaging BL RIC Workshop 22032011
VRE Cancer Imaging BL RIC Workshop 22032011
djmichael156
 

Similaire à .NET Attributes and Reflection - What a Developer Needs to Know... (20)

Object Oriented Programming In .Net
Object Oriented Programming In .NetObject Oriented Programming In .Net
Object Oriented Programming In .Net
 
chapter 5 Objectdesign.ppt
chapter 5 Objectdesign.pptchapter 5 Objectdesign.ppt
chapter 5 Objectdesign.ppt
 
C# .NET Developer Portfolio
C# .NET Developer PortfolioC# .NET Developer Portfolio
C# .NET Developer Portfolio
 
Encapsulation
EncapsulationEncapsulation
Encapsulation
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Patterns (contd)Software Development ProcessDesign patte.docx
Patterns (contd)Software Development ProcessDesign patte.docxPatterns (contd)Software Development ProcessDesign patte.docx
Patterns (contd)Software Development ProcessDesign patte.docx
 
Reflection Slides by Zubair Dar
Reflection Slides by Zubair DarReflection Slides by Zubair Dar
Reflection Slides by Zubair Dar
 
CUST-3 Document Management with Share
CUST-3 Document Management with ShareCUST-3 Document Management with Share
CUST-3 Document Management with Share
 
Bartlesville Dot Net User Group Design Patterns
Bartlesville Dot Net User Group Design PatternsBartlesville Dot Net User Group Design Patterns
Bartlesville Dot Net User Group Design Patterns
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arp
 
Object-oriented programming 3.pptx
Object-oriented programming 3.pptxObject-oriented programming 3.pptx
Object-oriented programming 3.pptx
 
ActionScript 3.0 Fundamentals
ActionScript 3.0 FundamentalsActionScript 3.0 Fundamentals
ActionScript 3.0 Fundamentals
 
Php oop (1)
Php oop (1)Php oop (1)
Php oop (1)
 
VRE Cancer Imaging BL RIC Workshop 22032011
VRE Cancer Imaging BL RIC Workshop 22032011VRE Cancer Imaging BL RIC Workshop 22032011
VRE Cancer Imaging BL RIC Workshop 22032011
 
csharp.docx
csharp.docxcsharp.docx
csharp.docx
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Patterns in Python
Patterns in PythonPatterns in Python
Patterns in Python
 
.NET Framework Projet with C#
.NET Framework Projet with C#.NET Framework Projet with C#
.NET Framework Projet with C#
 
C# 3.0 and LINQ Tech Talk
C# 3.0 and LINQ Tech TalkC# 3.0 and LINQ Tech Talk
C# 3.0 and LINQ Tech Talk
 
20.1 creating functions_part_20.1
20.1 creating functions_part_20.120.1 creating functions_part_20.1
20.1 creating functions_part_20.1
 

Dernier

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 

.NET Attributes and Reflection - What a Developer Needs to Know...

  • 1. .NET Attributes and Reflection “What a developer needs to know……” Presented By Dan Douglas    Blog: http://dandouglas.wordpress.com Twitter: @Dan_Douglas E-mail: dan.douglas@gmail.com
  • 2. What are Attributes? A .NET Object Represents data you want to associate with a target within the assembly Many possible targets, including, Assembly, Class, Member, Constructor, Enum, Interface, and Event Intrinsic Attributes (part of the CLR) Custom Attributes (developed)
  • 3. …..Attributes Create a custom attribute by creating a class that inherits from System.Attribute Attributes are accessed by the application using reflection to get attribute information Useful to easily provide additional data to a target without having to write a lot of additional code
  • 4. …..Attributes Multiple attributes can be assigned to a single target Many attributes in the System.ComponentModel namespace used by UI controls Provides information like Visibility, and Display Name
  • 5.
  • 6.
  • 7. Reflection Usage In .NET View metadata within an assembly Type Discovery Look at types within an assembly and also be able to instantiate them and use them Late Binding Dynamically instantiate types Invoke properties and methods dynamically from dynamically instantiated classes Create your own types and IL at runtime using Reflection.Emit (advanced)
  • 8. From a Technical Perspective… Reflection objects are available in the System.Reflection namespace Some of the classes available in the reflection namespace: Assembly ConstructorInfo MethodInfo
  • 9. From a Technical Perspective… Some of the classes available in the reflection namespace: EventInfo PropertyInfo ParameterInfo CustomAttributeData
  • 10. From a Technical Perspective… System.Reflection.Emit Namespace Advanced Level of Reflection Used in Very Specialized Scenarios Dynamically build assemblies and types Allows you to generate and execute.NET (IL-Intermediate Language) code on demand at runtime
  • 11. Red Gate .NET Reflector Useful utility that uses reflection to get information about .NET assemblies Allows you to view, navigate, and search through the class hierarchies of .NET assemblies Look at the code behind the objects in .NET Framework classes or any .NET compiled components to see how they work Because reflection allows access to private members, these members are visible within .NET reflector (Demo - .NET Reflector)
  • 12. Many Practical Uses….. Pluggable Application Architectures At runtime, load modules such as UI components into the application Business Objects Revertancel changes to a business object by cycling through its properties using reflection Quick and Dirty User Interfaces Get properties of a business object and add appropriate labels/text boxes to a form at runtime using property names
  • 13. Reflection Performance Reflection is faster in .NET 2.0 and higher than it was in .NET 1.1 When using reflection on a server (ex: ASP.NET) special concern should be taken to ensure that performance won’t be impacted with much higher workloads In situations where you do not know the object at design time, use a standard interface when possible You can avoid further reflection calls once you have a reference to the object by calling the methods of the interface Don’t avoid reflection due to performance concerns – rather use it where it makes sense
  • 14. Demo….. Use reflection to dynamically load an assembly located outside of the project and access and invoke one its methods
  • 15. Resources Hanselminutes Podcast #37 – Reflectionhttp://www.hanselminutes.com/default.aspx?showID=37 O’Reilly – Programming C# Chapter 18 (Attributes And Reflection)http://oreilly.com/catalog/progcsharp/chapter/ch18.html Dodge Common Performance Pitfalls to Craft Speedy Applicationshttp://msdn.microsoft.com/en-us/magazine/cc163759.aspx Real-world Reflection in .NEThttp://www.devx.com/dotnet/Article/31578/1954 My Blog (Dan Douglas) http://dandouglas.wordpress.com
  • 16. Questions? Dan Douglas    Blog: http://dandouglas.wordpress.com Twitter: @Dan_Douglas E-mail: dan.douglas@gmail.com Consulting Inquiries? (519) 777-2258

Notes de l'éditeur

  1. Custom Attributes are created by the developer to be used for his or her own purpose or requirements
  2. Reflection – we will talk about that in the upcoming slidesUseful to easily provide additional data to a target without having to write a lot of additional code-Example: An attribute that specifies what a Display or Friendly Name should be for a field or a Tooltip – this functionality can be added to the property of the class simply by using a custom attribute
  3. Metadata - - info about the data about the types, code, assembly
  4. -The PropertyGrid uses the information to group Properties by Category and also use a friendly display name-3rd Part Grid controls typically use Display Name to display a friendly column name
  5. Metadata - - info about the data about the types, code, assembly
  6. Metadata - - info about the data about the types, code, assembly
  7. Assembly Load assemblies at runtime Locate the types used within the assemblyConstructorInfo Discover attributes of a class constructor Access to constructor metadata Invoke a ConstructorMethodInfoDiscover attributes of a method Access to method metadata Invoke a method (late binding)
  8. CustomAttributeData – used for getting access to custom attribute information from Classes, Properties, Methods, etc
  9. Microsoft Intermediate LanguageSome primary uses include Script Engines and CompilersThis can have a speed increase in certain scenarios – for example when doing a lot of looping within a calculation could have a speed increase if you generate IL code of the entire calculation and then just do the calculation.. No looping. Only recommended in very advanced and specialized scenarios.
  10. |Quick and Dirty User Interfaces – could be expanded by using custom attributes that specify size, read-only, color, label name, etc
  11. Think about how you use reflection because there is a performance hitASP.NET – There may not be a performance impact using reflection with just a few users, but it may have a largely magnified impact with higher workloads…Example: If you know the interface of the type of object you are instantiating using reflection (because you don’t know the name of the object until runtime) you can eliminate further reflection calls by casting the new instance of the Interface to an object declared of that interface type. Method calls to interface methods will not require a reflection call because you know the methods of the Interface.Don’t avoid reflection due to performance concerns – rather use it where it makes sense  Even the .NET Framework uses Reflection internally in the framework.