c# - Can PropertyInfo.DeclaringType really ever be null? -


i'm using resharper (older version), used warn me when use propertyinfo.declaringtype can null.

it doesn't make sense me @ first , second glances. true, or resharper bit dumb , doesn't notice it's propertyinfo, not general memberinfo?

propertyinfo.declaringtype property inherited memberinfo.declaringtype , documentation:

if memberinfo object global member (that is, if obtained module.getmethods method, returns global methods on module), returned declaringtype null.

so, warning seems fine in case.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -