![]() |
| ||
| loop through properties? I'm not quite sure how to tackle this problem. I have a form that displays the properties of a class. I have events for all the properties so the form gets updated automatically when the properties change. However, upon initializing a class, these events do not get called, and so the form starts out blank. What is the best way to program so that when I have a new class, the form displays the class's properties immediately? (One idea I had was to loop through the properties and call each event... is there a way to loop through class properties in .NET?) |
| ||
| Re: loop through properties? Sure you can, see the implementation below. This example is a copy/paste code from my project in which I added a class "ValidationInstance" which holds a collection of items which should be checked (or préfilled before the handler IsValid will be raisen). Dim iPropertyCount As Integer = 0 |
| ||
| Re: loop through properties? Okay, thanks. |
| All times are GMT -4. The time now is 8:00 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC