Click here to Skip to main content
Licence 
First Posted 6 Apr 2007
Views 10,444
Bookmarked 16 times

Browsing objects using ObjectReflector.Net

By | 6 Apr 2007 | Article
Browse any object using ObjectReflector.Net at runtime

DownloadObjectReflector.Net source code from CodePlex

Introduction

Which developer doesn't use Visual Studio Watcher and browse properties and fields values to debug his application? I think the response is No one.

However, imagine that you have not visual studio installed and something is going wrong with your application. Logging will be the solution of course, but how much data will application logs? Can you log all properties and fields values of all your objects? The response is definitively no.

ObjectReflector.Net can be the way for debugging applications at the user's desktops side.

Here a screen shot of what you can browse with ObjectReflector.Net :

Screenshot - ObjectReflector.jpg

Using the code

Using ObjectReflector.Net requires a single line of code. Begin by adding a reference to ObjectReflector.Dll, drag the ucBrowser from your Visual Studio toolbox to a form and add this line of c# in your code :

myBrowser.DataSource = this; //This line will allow you to browse the form it self

The left panel of the browser control allows enabling/disabling some options :

- Show NonPublic members : Checking this option will show all properties and fields including private and protected ones.

- Show Static members : Static properties and fields are shown/hidden depeding on the checkstate of the checkbox.

- Sort memeber by name : If checked, properties and fields are sorted by name before they are displayed in the treeview.

History

- 4/6/2007: ObjectReflector.Net article submitted.

Conclusion

Reflection is one of most powerfull features in the .Net framework. ObjectReflector.Net is a good sample i hope for those who don't discover reflection yet.

Regards,

Hayder Marzouk

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Hayder Marzouk

Web Developer

France France

Member

MCSD Asp.Net certified developer

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralCha7ata Pinmemberbear_berry5:09 24 Apr '07  
GeneralTypo Pinmembernarsyseth10:48 17 Apr '07  
GeneralRe: Typo PinmemberHayder Marzouk10:55 17 Apr '07  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120517.1 | Last Updated 6 Apr 2007
Article Copyright 2007 by Hayder Marzouk
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid