Dynamic Operations

To finish off our overview of DynamicObject and DynamicMetaObject, let’s take a quick look at the various operations that can be specialized by overriding a method on those base classes. Some of those operations have a C# notation, whereas others exist in dynamic languages only:

Image Binary operations, such as mathematical logical operators and (in)equality operators. For example, a + b, a > b, a && b.

Image Unary operations, such as logical negation or complement or numeric minus or plus. For example, -a, !a.

Getting and setting members ...

Get C# 5.0 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.