c# - get_PropertyName()/set_PropertyName() vs PropertyName? -


i'm using reflection on assembly of public api working along system.codedom generate code extract information through api.

in part of auto-generated code referencing values of number of properties of types in api assembly. however, keep ending references properties don't actualy exist in generated code. used type.getproperties() understand should return public properties.

i looked further , found when had missing property, called sampleproperty there instead 2 methods in class called get_sampleproperty , set_sampleproperty no actual sampleproperty property.

what's going on here? why intellisense treat these methods separate methods, when when returned through reflection show property?

i used propertyinfo.getproperties() understand should return public properties.

that might first hang-up, propertyinfo class doesn't have getproperties method. type class does. question otherwise indicates using type.getmethods(). yes, returns get_blah , set_blah property accessor methods property. under hood, properties implemented methods.

use type.getproperties() reflect properties.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -