Home

expando

Expando is a term used in software development to describe an object or data structure whose members can be added, removed, or modified at runtime, effectively allowing its shape to expand beyond a fixed schema. The concept is common in dynamic programming languages and in systems that require flexible data models, such as deserialization of loosely structured data or runtime object composition.

In .NET, ExpandoObject embodies this concept. Provided by the System.Dynamic namespace, ExpandoObject enables properties to be

Other languages and environments treat the idea similarly without necessarily using the term expando. JavaScript objects,

Advantages of expando-like structures include flexibility and rapid prototyping, while drawbacks include reduced compile-time type safety,

added
or
removed
on
the
fly
while
the
object
is
accessed
through
dynamic
binding.
As
a
dynamic
object,
properties
can
be
created
at
runtime,
and
the
object
also
implements
standard
dictionary
interfaces
to
enumerate
and
manipulate
its
members.
This
makes
it
convenient
for
scenarios
such
as
constructing
data
transfer
objects
on
demand
or
wrapping
loosely
typed
data
sources
like
JSON.
Python
dictionaries
with
dynamic
attributes,
or
OpenStruct-like
types
in
some
languages
allow
runtime
extension
of
an
object's
attributes.
potential
performance
costs,
and
possible
difficulties
with
refactoring
and
tooling
support.