Join Ted Neward for an in-depth discussion in this video Properties API demo, part of CLR Reflection for Developers.
- [Male Narrator] So to explore the property info API,…let's do basically the same exercise…that we were just doing.…We're going to have the mirror class.…We're going to add a new method called DumpProperties,…and it's the same basic idea here:…we will go ahead, and we will discover…whatever properties are on this particular type.…So we'll just put a little header right here.…And then, well fundamentally, we're just going to go ahead…and walk through the list of properties that are returned…by the type when we say MirroredType.GetProperties…like so.…
Now, notice that there are two overloads here.…One just hands back the public properties…of the current type.…The other says we'll take a binding flags enumeration,…and this will search for all of the properties…of the current type using the specified binding constraints.…Let's go ahead and actually use the BindingFlag,…and notice that this is going to return a property info,…so let's go ahead and capture this…in a foreach var prop in GetProperties like so.…
The BindingFlags in particular that we want to use ...…
- 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.