Application Variables
-
I can get a collection of system variables, and the collection of controls my form has in it. But, is there a method to get the collection of class variables, and possibly local variables to a function? This is for error-handling purposes, so as much information about my runtime that I can get, the better. This is a windows app, not asp. Thanks!
-
I can get a collection of system variables, and the collection of controls my form has in it. But, is there a method to get the collection of class variables, and possibly local variables to a function? This is for error-handling purposes, so as much information about my runtime that I can get, the better. This is a windows app, not asp. Thanks!
DougW48 wrote: This is for error-handling purposes, so as much information about my runtime that I can get, the better. It sounds like you are trying to break encapsulation which would really muddy and complicate the design of your application. If an unexpected error condition arises you should throw an exception. If you need to you should create an exception class and design it so that it can be loaded with the error information so that the error handler (the catch block) can see the necessary information. However you should think carefully about whether you actually need the information or if it is just a quick solution now that will muddle things in the future.
Cada uno es artifice de su ventura WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and Forums
-
I can get a collection of system variables, and the collection of controls my form has in it. But, is there a method to get the collection of class variables, and possibly local variables to a function? This is for error-handling purposes, so as much information about my runtime that I can get, the better. This is a windows app, not asp. Thanks!
It is possible to get values of class level variables using reflection, but I don't think it is possible to write generic code to get values of local variables. Regards Senthil My Blog