Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A good and complete tutorial about reflection in .NET? [closed]

the question almost says it all. I think all of you know about the visual studio designer, and how it can show any property of an object, regardless of its type, provided that the property is allowed to be shown in the designer.

I am working on a function that could achieve the same thing, but for this, I need a complete tutorial about reflection, so that this function can treat every type of property.

Any suggestions?

like image 738
GianT971 Avatar asked Feb 24 '12 10:02

GianT971


2 Answers

Here are some good links :

  • http://csharp.net-tutorials.com/reflection/introduction/
  • http://www.codeproject.com/Articles/17269/Reflection-in-C-Tutorial
  • http://www.codeguru.com/csharp/csharp/cs_misc/reflection/article.php/c4257
  • http://www.youtube.com/watch?v=C-G7fobbBP0
like image 159
Micah Armantrout Avatar answered Oct 18 '22 21:10

Micah Armantrout


Here some info:

  • http://www.codeproject.com/Articles/55710/Reflection-in-NET
  • CLR via C# by Jeffrey Richter has a good chapter on Reflection

However, I'd recommend a bit different although harder approach. If you really want to completely understand the topic, that's what you need.

Read Standard ECMA-335 Partition II: Metadata Definition and Semantics which explains how .NET uses its metadata

Then read and understand some code that reads this metadata. Mono.Cecil would be a good candidate.

That will completely cover the Reflection topic

like image 20
user1234883 Avatar answered Oct 18 '22 21:10

user1234883