> If I get an object generated by SQL Metal I can do a call like:
>
[quoted text clipped - 14 lines]
>
> Any Thoughts?
Yes - GetProperty returns a PropertyInfo, and you're calling GetType()
on that. You should be using
db.GetType().GetProperty("Persons").PropertyType.GetMethods()

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Ben Voigt [C++ MVP] - 26 Sep 2007 23:39 GMT
>> If I get an object generated by SQL Metal I can do a call like:
>>
[quoted text clipped - 19 lines]
>
> db.GetType().GetProperty("Persons").PropertyType.GetMethods()
Moreover, you likely want to use the override of GetMethods that accepts an
argument. From its doc page:
The following BindingFlags filter flags can be used to define which methods
to include in the search:
a.. You must specify either BindingFlags.Instance or BindingFlags.Static
in order to get a return.
b.. Specify BindingFlags.Public to include public methods in the search.
c.. Specify BindingFlags.NonPublic to include non-public methods (that is,
private and protected members) in the search.
d.. Specify BindingFlags.FlattenHierarchy to include public and protected
static members up the hierarchy; private static members in inherited classes
are not included.
The following BindingFlags modifier flags can be used to change how the
search works:
a.. BindingFlags.DeclaredOnly to search only the methods declared on the
Type, not methods that were simply inherited.