Managing Parameter/Variable Name Conflicts with this : this « Class « Flash / Flex / ActionScript






Managing Parameter/Variable Name Conflicts with this

 
  

  class MyClass {
    private var calories = 1000;

    public function eat (calories) {
      this.calories += calories;
    }
  }

        








Related examples in the same category

1.Use this to reference member variable