Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / July 2007

Tip: Looking for answers? Try searching our database.

Terminology - Reflection

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DesCF - 31 Jul 2007 09:11 GMT
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

Signature

Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Lloyd Sheen - 31 Jul 2007 09:23 GMT
> 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
tommaso.gastaldi@uniroma1.it - 31 Jul 2007 10:15 GMT
> 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
[quoted text clipped - 5 lines]
> --
> 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 serialized> fields 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
Armin Zingler - 31 Jul 2007 11:54 GMT
> 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
DesCF - 31 Jul 2007 16:52 GMT
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) ?

>> 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
[quoted text clipped - 8 lines]
>
> Armin

Signature

Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Armin Zingler - 31 Jul 2007 17:01 GMT
> 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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.