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.
Saturday, June 7, 2008
IS vs AS
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment