Skip to content

Type doesn't contain property with name 'System.Object' #7

@tankbob

Description

@tankbob

if the property name passed to property is not a straight string then the detection engine doesn't seem to correctly identify and shows an error as doesn't contain a property with name 'System.Object'.

For example the following line:

typeof(Payment).GetProperty(paymentType + (isRefund) ? "Refund" : String.Empty));

As it may not be possible to correctly decode the variable it is possibly worth creating a different inspection type of "Dynamic Property Name invocation" that can be set to warning rather than error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions