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 obtainedmodule.getmethods
method, returns global methods on module), returneddeclaringtype
null
.
so, warning seems fine in case.
Comments
Post a Comment