1. Computing & Technology

Discuss in my forum

in Delphi TIPS :: In Delphi the AS keyword is used for casting an object (or interface) of one type to another. When several controls share an event handling procedure, for example a button and a menu item, you end up using the Sender parameter to identify the control that actually caused the event to be raised.

When casting the Sender you can either use the hard-cast, for example, TButton(Sender) or the as-cast (Sender as TButton).

Read the full article to learn about TObject(Sender) vs. (Sender as TObject) - Differences Between a Hard Cast and an AS Cast in Delphi.

Related:

Comments
No comments yet.  Leave a Comment
Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>
Related Searches delphi

©2012 About.com. All rights reserved.

A part of The New York Times Company.