J
James A. Fortune
Although I've never programmed in VB.NET, this past week I read the
following book:
Visual Basic .NET Reflection Handbook
Wrox Press 2002
ISBN 1-86100-759-0
It basically extols the dynamic linking that Reflection allows. I
read it in the hope that its concepts could mostly be carried over to
using Reflection in C#. P. 16 states:
"In other words, we've just found a limit of the late binding provided
by VB.NET. If we want to select a method that can accept a particular
kind of object based on its 'runtime' type, overloading doesn't
provide a good mechanism for it, because overload resolution uses the
compile-time type. In fact, there is no syntactic mechanism to
reliably do what we want. What we need, in order to do this, is
controllable late binding. Reflection provides this ability to take
complete control at runtime of what code is executed."
After showing ways to examine Metadata, mostly through the
System.Reflection and System.Type classes, it contrasts invocation
through Reflection with invocation using Delegates before continuing
on to dynamic invocation and dynamic creation of objects through
Reflection.
P. 100 states:
"The developer can design an architecture that can easily be expanded
and extended without redevelopment, and in some cases can be added on
the fly without recompiling the original source code."
That concept was straightforward and easy to understand, although it
would be nice to know how prevalent the use of that technique is.
Then it shows how to use the Abstract Factory Pattern to assist in
loading assemblies dynamically. Next it shows how to implement
standard and custom attributes. The coup de grâce (the final chapter)
talks about the System.ComponentModel namespace and how it enables
creating custom collections and enables greater programming
flexibility. After looking at the documentation on MSDN for the
System.ComponentModel, I see that it is relatively vast. Now for my
question! Can someone who uses that namespace give me an idea of what
kind of programming flexibility I can hope to gain if I wade into it
compared to what I get using more commonly used namespaces?
Thanks in advance,
James A. Fortune
(e-mail address removed)
You have to be able to learn things from everybody. However, you
learn more from those who are better at things than from those who are
not.
following book:
Visual Basic .NET Reflection Handbook
Wrox Press 2002
ISBN 1-86100-759-0
It basically extols the dynamic linking that Reflection allows. I
read it in the hope that its concepts could mostly be carried over to
using Reflection in C#. P. 16 states:
"In other words, we've just found a limit of the late binding provided
by VB.NET. If we want to select a method that can accept a particular
kind of object based on its 'runtime' type, overloading doesn't
provide a good mechanism for it, because overload resolution uses the
compile-time type. In fact, there is no syntactic mechanism to
reliably do what we want. What we need, in order to do this, is
controllable late binding. Reflection provides this ability to take
complete control at runtime of what code is executed."
After showing ways to examine Metadata, mostly through the
System.Reflection and System.Type classes, it contrasts invocation
through Reflection with invocation using Delegates before continuing
on to dynamic invocation and dynamic creation of objects through
Reflection.
P. 100 states:
"The developer can design an architecture that can easily be expanded
and extended without redevelopment, and in some cases can be added on
the fly without recompiling the original source code."
That concept was straightforward and easy to understand, although it
would be nice to know how prevalent the use of that technique is.
Then it shows how to use the Abstract Factory Pattern to assist in
loading assemblies dynamically. Next it shows how to implement
standard and custom attributes. The coup de grâce (the final chapter)
talks about the System.ComponentModel namespace and how it enables
creating custom collections and enables greater programming
flexibility. After looking at the documentation on MSDN for the
System.ComponentModel, I see that it is relatively vast. Now for my
question! Can someone who uses that namespace give me an idea of what
kind of programming flexibility I can hope to gain if I wade into it
compared to what I get using more commonly used namespaces?
Thanks in advance,
James A. Fortune
(e-mail address removed)
You have to be able to learn things from everybody. However, you
learn more from those who are better at things than from those who are
not.