Join Ted Neward for an in-depth discussion in this video Constructors API demo, part of CLR Reflection for Developers.
- [Instructor] So again, let's do the same thing…as we've been doing with our little mirror-type.…Let's go ahead and dump constructors as well here…and again, we're just going to kind of follow…the same basic pattern.…Put on a label here and then for each…var ctor in MirroredType dot GetConstructors…and again we're going to pass in the same flags…because we want to look at basically…all of the public, non-public constructors et cetera.…
And in this particular case,…we're just going to print out the various parameters…that we see to the constructor.…Again, if you're going to look for a particular constructor,…you would need to pass the parameters as an array…in the GetConstructor call.…And we'll start to see a little bit more…of the picking out a particular constructor,…picking out a particular method in just a second.…But for the moment, let's actually look at…what the constructor output looks like.…
Go back.…So let's go back here to where we exercise…the MirrorClass, mirroredPoint dot DumpConstructors…like so.…
- 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.