Use the as operator when the normal program flow is to test for the interface and—immediately—cast the object for access to the interface members.
Use the is operator when the normal program flow is to test for the interface; but, interface member access is either delayed or does not occur at all.
No comments:
Post a Comment