Prism Definition Flashcard:
Definition: Delphi Prism Self Keyword (Self)

Delphi Prism Self Keyword

Within the implementation of a method, the identifier Self references the object in which the method is called. The Self variable is an implicit parameter for each object method. A method can use this variable to refer to its owning class.

To refer to the current instance of a class or structure, use the Self keyword. It provides a way to refer to the specific instance in which the code is currently executing. It is particularly useful for passing information about the currently executing instance.

You cannot use it with static method functions because static methods do not belong to an object instance. If you try, you'll get an error.



Comments

1 Comments.
Share a thought or comment...
Comment 1 of 1

What a fabulous post this has been. Never seen this kind of useful post. I am grateful to you and expect more number of posts like these. Thank you very much. Mayo Clinic Patient Portal App

Posted 9/7/2023
Definition Contributed By Mike Prestwood:

Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions. Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains play-drums.com and has authored 3 drum books. If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.

Visit Profile
www.prestwood.com For service: 916-726-5675
or support@prestwood.com
Copyright (C) Prestwood IT Solutions.
All Rights Reserved.
Printed 3/13/2025