Skip to main content

Using Objects

  • Chapter
  • 209 Accesses

Summary

In this chapter we discussed how to use reflection in an active way to control class members. We considered the following topics:

  • Reasons you should consider using dynamic invocation techniques on types and their members

  • How to dynamically invoke methods, properties, and fields using Type.InvokeMember()

  • How to dynamically invoke methods using MethodInfo.Invoke()

  • How to dynamically modify fields and properties using the GetValue() and SetValue() methods of the FieldInfo and PropertyInfo classes

  • Why using dynamic invocation via reflection is not always the best choice, and when you should use delegates instead

In the next chapter, we’ll consider how to create objects using reflection.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD   54.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Rights and permissions

Reprints and permissions

Copyright information

© 2005 Tobin Titus, Syed Fahad Gilani, Mike Gillespie, James Hart, Benny K. Mathew, Andy Olsen, David Curran, Jon Pinnock, Robin Pars, Fabio Claudio Ferracchiati, Sandra Gopikrishna, Tejaswi Redkar, Srinivasa Sivakumar

About this chapter

Cite this chapter

(2005). Using Objects. In: Pro .NET 1.1 Remoting, Reflection, and Threading. Apress. https://doi.org/10.1007/978-1-4302-0025-3_9

Download citation

Publish with us

Policies and ethics