Hello World!
Today a fellow colleague asked me if it is possible to programmatically access the fields of a custom type and check if they are null or empty and take some action based on the test.
I knew this had to be solved by using reflection by determining the runtime "Type" and then enlist members. On research, found this useful link:
There are several (working!!) examples here that demonstrate the technique.
All the best!
No comments:
Post a Comment