You need to sign in to do that
Don't have an account?

What is a Instanceof keyword
Hi,
Can anybody explain what is instanceof keyword in salesforce with small example?
In which scenario we can use this..
You need to sign in to do that
Don't have an account?
Hi,
Can anybody explain what is instanceof keyword in salesforce with small example?
In which scenario we can use this..
The instanceof keyword allows you to check the if an object is an instance of a class. Thus you could have something which is passed in as simply an Object type, and you can then determine if it is an instance of your custom class and take appropriate action, e.g.
Boolean checkClass = varClass instanceof MyCustomClass;
Here 'MyCustomClass' is the name of your apex class.
Returns boolean result.