locked
TargetType and TargetObject are mutually exclusive for InvokeMethod 'InvokeMethod' RRS feed

  • Question

  • I am getting the following error when using InvokeMethod inside Activity

    TargetType and TargetObject are mutually exclusive for InvokeMethod 'InvokeMethod'

     

     

    TargetObject is assigned to: New LoanRules

    TargetType is assigned to: LoanRules

    MethodName is assigned to: LoanRuleMethod1

     

    WHERE LoanRules is class 

    Any Idea?


    Chintan
    Monday, September 12, 2011 9:15 PM

Answers

  • iTechDesign,

    I think it's because you don't need to specify a TargetObject AND TargetType.  Only one of the two.  If you're going to invoke an instance method then pass in the instance of your class in TargetObject.  if you're going to invoke a static method then use the TargetType property.  

     

     


    Tom Overton
    Tuesday, September 13, 2011 12:35 AM

All replies

  • iTechDesign,

    I think it's because you don't need to specify a TargetObject AND TargetType.  Only one of the two.  If you're going to invoke an instance method then pass in the instance of your class in TargetObject.  if you're going to invoke a static method then use the TargetType property.  

     

     


    Tom Overton
    Tuesday, September 13, 2011 12:35 AM
  • Thanks Tom, I appreciate it.
    Chintan
    Tuesday, September 13, 2011 2:26 PM