سؤال

Just to slake my curiosity, what is the opposite of the is reserved keyword in ActionScript 3, as shown in this example:

if (myObject is ArrayCollection) {
  //Do stuff...
} else {
  //Do something else...
}

So that I could do something like this:

if (myObject isnotoperator ArrayCollection) {
  //Do something else...
} else {
  //Do stuff...
}

Thank you for your time.

هل كانت مفيدة؟

المحلول

I don't believe there is one. Instead I prefix the statement with the boolean not operator like so:

if (!(myObject is ArrayCollection)) {
  //Do stuff...
} else {
  //Do something else...
}
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top