Set bool While the GameObject is active

hi, im making a code setting it is true while the object is setActive
here is my coding

public bool itIsStillActiving;

void Update(){
       while(this.gameObject.SetActive == true){
        itIsStillActiving = true;
        break;
        }
}

it comes with an error Operator ‘==’ cannot be applied to operands of type ‘method group’ and ’ bool’
so how should i change or do the same thing with other code?
please help me

while(gameObject.activeInHierarchy)
{
itIsStillActiving = true;
break;
}

Hello,

It should be this way :

public bool itIsStillActiving;
 
 void Update(){
       if(this.gameObject.activeSelf){
         itIsStillActiving = true;

       }
 }