Delphi Interface Definition

Source: Internet
Author: User

the definition of Delphi interface interface

2011-04-20 14:54:11| Category: Delphi| Report | Font size Subscription

Type
InterfaceName = Interface (ancestorinterface)
[' {GUID} ']
Memberlist
End
Here, the Ancestorinterface and GUIDs are optional. In most respects, interface declarations are similar to class declarations, with the following limitations:
1.memberList can contain only methods and properties, and cannot contain data members (field).
2. Because the interface has no data members, the read and write qualifiers for the properties in the interface must be methods.
3. All members of the interface are public and are not allowed to use the visibility qualifier.
4. Interfaces do not have constructors or destructors, they cannot be instantiated directly unless they are using classes that implement their methods.
5. The method cannot be declared as virtual, dynamic, abstract, or override. Because the interfaces do not implement their methods, these declarations have no meaning.
Tip: In the IDE of Delphi, press the CTRL+SHIFT+G key to generate a new GUID for an interface.

Delphi Interface Definition

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.