Join Ted Neward for an in-depth discussion in this video MethodBase and MethodInfo API demo, part of CLR Reflection for Developers.
- [Instructor] Now again by way of examining the method info…we'll go ahead and create a DumpMethods method…on our mirror class here.…And again, it's going to do basically the same kind…of investigative thing that we've seen thus far…for properties, and again we'll do the same thing…for constructors and fields in just a second.…And again we're going to make use of the same binding flags.…And as a matter of fact, we're going to use this…a couple of different times.…So let's go ahead and stick this guy out here…as a private const.…
We're going to make use of this flags on a number…of occasions, so we'll just go ahead and refactor the code…as we go here to be a little bit easier to work with.…So BindingFlags, there we go.…So same idea, we're going to do a foreach across…all of the methods defined inside of this particular type…but we're going to be looking for meth,…and we're going to be looking for GetMethods like so.…
Now again one of the first things that we'll want to look at…will be the name of the method, so Console.WriteLine.…
- Working with the IL Disassembler (Ildasm)
- Namespaces and types
- Type API
- Properties API
- MethodBase and MethodInfo API
- Constructors API
- Fields API
- Constructing objects
- Accessing properties and fields
- Invoking methods
Skill Level Intermediate
Deploying .NET Applications with Octopus Deploywith Floyd Hilton1h 27m Intermediate
2. IL Disassembler (Ildasm)
3. Reflection Namespace and Types
4. Type API
5. Properties API
6. MethodBase and MethodInfo API
7. Constructors API
Constructors API demo2m 52s
8. Fields API
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.