Following code will trigger (E417) Interface types not allowed on unmanaged records error.
public interface ITestInterface {}
public struct AStruct : ITestInterface
{
int testfield;
}
It’s strange since struct interfaces should be part of c# spec:
18.1.2 Struct interfaces
A struct declaration can include a struct-interfaces specification, in which case the struct is said to implement the given interface types.
struct-interfaces:
: interface-type-list
The handling of interfaces on multiple parts of a partial struct declaration (§17.1.4) are discussed further in §17.1.2.2.
Interface implementations are discussed further in §20.4.
on the Cocoa platform, structs are regular C-level structs, not objects. Thats required, because otherwise you could not interact with the many Cocoa and CoreFoundation APIs that take structs (such as say, CGPoints).
http://www.elementswiki.com/en/Language_Platform_Differences should have this info. the text refers to Oxygene mostly, but (language syntaxes aside) should equally apply to RemObjects C#. I’ll gte that mage reviewed and brought up to speed to cleanly cover both languages,