By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,608 Members | 1,925 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,608 IT Pros & Developers. It's quick & easy.

Terminology - Reflection

P: n/a

What exactly is Reflection ? I've looked at the definition in Help but I
don't find it very helpful! I just stare at it blankly and can't quite
seem to grasp its meaning conceptually. Reflection implies something
reflected. Does anyone have a good cogent description of its meaning ?

Des

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Jul 31 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a

"DesCF" <de***@aol.comwrote in message news:op.twbk16fbupgxg0@descstar...
>
What exactly is Reflection ? I've looked at the definition in Help but I
don't find it very helpful! I just stare at it blankly and can't quite
seem to grasp its meaning conceptually. Reflection implies something
reflected. Does anyone have a good cogent description of its meaning ?
You are on the right track. Reflection is a set of classes that allow you
to examine the details of those classes. You can obtain all the information
about properties, methods etc. There are also methods which allow you to
create an object using reflection and call the methods of the object without
having compiled code to access the object (actually there is compiled code
but that code is the reflection code not the object code).

It can be used to dynamically load assemblies for things like application
plug-ins.

To illustrate what reflection can do, I created a navigator control which
shows the contents of a SQL Server. It uses the classes from SMO and
reflection. There is only one entry which is required for SMO to work and
that is a connection. After that I use reflection to enumerate the
properties such that I can determine collections etc.

Hope this helps
Lloyd Sheen

Jul 31 '07 #2

P: n/a
On 31 Lug, 10:11, DesCF <de...@aol.comwrote:
What exactly is Reflection ? I've looked at the definition in Help but I
don't find it very helpful! I just stare at it blankly and can't quite
seem to grasp its meaning conceptually. Reflection implies something
reflected. Does anyone have a good cogent description of its meaning ?

Des

--
Using Opera's revolutionary e-mail client:http://www.opera.com/mail/
I think this can be understood well, just like all the programming
concepts, only by practice,
especially on some meaningful project.

I could tell you I could not live without reflection ! :-)))

Anyway, to start with here is an excercise which will make you
understand it better.
Homework :-)
===========

Take o write a program where you have a serializable class with a
some
<non serializedfields and some "reference" type fields (not only
value type fields).

Create a dialog form to allow an user editing the field and the
properties of an instance of this class
with a "CANCEL" feature. In other words, if the user "cancels" the
dialog, the object must be
"restored" completely and perfectly to its original state [careful
with non serialized reference values].

Post here your solution for discussion and grade :-))

Tommaso


Jul 31 '07 #3

P: n/a
"DesCF" <de***@aol.comschrieb
>
What exactly is Reflection ? I've looked at the definition in Help
but I don't find it very helpful! I just stare at it blankly and
can't quite seem to grasp its meaning conceptually. Reflection
implies something reflected. Does anyone have a good cogent
description of its meaning ?

Reflection means that the code can reflect about itself. Code can examine
and get information about itself. This is possible by additionally having
meta data in the assemblies that describes the code
(classes/types/methods/parameters...).
Armin

Jul 31 '07 #4

P: n/a
This is the conceptually most intesting reply. It suggests that the
correct understanding of the term Reflection is not 'reflection in a
mirror' but reflection upon something (ones life for example) ?

On Tue, 31 Jul 2007 11:54:59 +0100, Armin Zingler <az*******@freenet.de>
wrote:
"DesCF" <de***@aol.comschrieb
>>
What exactly is Reflection ? I've looked at the definition in Help
but I don't find it very helpful! I just stare at it blankly and
can't quite seem to grasp its meaning conceptually. Reflection
implies something reflected. Does anyone have a good cogent
description of its meaning ?


Reflection means that the code can reflect about itself. Code can
examine and get information about itself. This is possible by
additionally having meta data in the assemblies that describes the code
(classes/types/methods/parameters...).
Armin


--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Jul 31 '07 #5

P: n/a
"DesCF" <de***@aol.comschrieb
This is the conceptually most intesting reply. It suggests that the
correct understanding of the term Reflection is not 'reflection in a
mirror' but reflection upon something (ones life for example) ?

Hmmm...
Isn't a mirror a mean to reflect yourself reflecting your own life. :-)
Armin
Jul 31 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.