Help needed to add a rule for this kind of bug in the product.
Problem statement: Public property without a private variable used the Getters and Setters. Given the example below that “Name” is used as property name and also local variable, but not declared the local variable. In this case, when we assign the data to this property, it goes as recursive call infinitely and finally gets time-out from the service.
public string Name
{
get
{
return Name;
}
set
{
Name = value;
}
}
This is the code in C#. Do you have any rule already to capture for this bug. If you have the rule, please share the details.