donvittorio
Programmer
Hello all,
Can anybody explain to me the difference between the two methods of type casting? For example:
(Sender as TButton).Caption := 'Button1'
or
TButton(Sender).Caption := 'Button1'
I know that there must be a difference because sometimes Delphi does not like the second way of type casting, but I've never figured out why.
Steve
Can anybody explain to me the difference between the two methods of type casting? For example:
(Sender as TButton).Caption := 'Button1'
or
TButton(Sender).Caption := 'Button1'
I know that there must be a difference because sometimes Delphi does not like the second way of type casting, but I've never figured out why.
Steve