Interfaces

Top  Previous  Next

What is translated > Types > Records, Classes, Interfaces > Interfaces

Delphi interfaces provide a way to define contracts independently of their implementation. Originally based on the Component Object Model (COM), they support multiple inheritance and reference counting through AddRef and Release. These features make interfaces a key part of component-based software design in Delphi.

 

Delphi2C# is purely .NET-centric. It does not attempt to fully replicate COM interop, but instead generates a .NET-compatible approximation of Delphi’s interface model. In C#, interfaces represent behavioral contracts and are managed by the garbage collector; they do not include ownership or lifetime semantics by default. COM compatibility in Delphi2C# is partial, internal, and not intended for production use.

 

This chapter outlines how Delphi interfaces can be translated systematically into C#, preserving both their structural design and semantic behavior.

 

 

Interface declarations

Interface implementation

Interface reference counting

Interface type checking

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 



This page belongs to the Delphi2C# Documentation

Delphi2C# home  Content