About This eBook by Bart De Smet

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

O'Reilly logo

The typeof Operator: A Sneak Peek at Reflection

One of the big advantages of having metadata baked in to the runtime is the capability to provide reflection capabilities. Tools can use metadata to provide designer experiences by providing property grids to configure items that need configuration (for example, user interface [UI] controls). Via reflection, that metadata is readily available at runtime.

The most common starting point for use of reflection is at the type level. Suppose that we want to know all the properties a type exposes. For example, a Button control could have a Width and Height of type double and a Text of type string. Or the built-in DateTime type has properties like Day, Month, Year, and so on. So, what we need is a runtime ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required