public static bool AlreadyContainsCallToMember(PropertyDefinition propertyDefinition, string methodName) { var instructions = propertyDefinition.SetMethod.Body.Instructions; return instructions.Any(x => x.OpCode.IsCall() && x.Operand is MethodReference && ((MethodReference) x.Operand).Name == methodName); } }