C# CodeGen ignores RODLStruct AutoCreateParams="1" for nested structs

Delphi XE5, RemObjects SDK for Delphi and all Clients

RODLStruct AutoCreateParams defines “if the described object has the ability to autocreate fields”.
When AutoCreateParams is enabled:

  • Delphi CodeGen follows this rule and autocreates field in property getter.
  • C# CodeGen ignores AutoCreateParams and leaves field unassigned in property getter.

As a result we have generated classes with asymmetric behavior.
Is it a bug?


RODL file extras:

<Struct Name="AddressData" AutoCreateParams="1">
    <Element Name="Country" DataType="WideString"/>

<Struct Name="CustomerData" AutoCreateParams="1">
    <Element Name="DeliveryAddress" DataType="AddressData"/>
    <Element Name="InvoiceAddress" DataType="AddressData"/>

Delphi CodeGen (OK):

CustomerData = class(TROComplexType)
function GetDeliveryAddress: AddressData;

function CustomerData.GetDeliveryAddress: AddressData;
if (fDeliveryAddress = nil) then fDeliveryAddress := AddressData.Create();
Result := fDeliveryAddress;

C# CodeGen (???):

class CustomerData : ComplexType {
public virtual AddressData DeliveryAddress {
get {
return @__DeliveryAddress;


Nice to get some feedback from support team on this issue.


Sorry for belated answer. I’ll log the appropriate issue. Still just implementing this feature would be a possibly breaking change, so it will be discussed further.


Thanks, logged as bugs://73848

Any update on this issue?


We are currently re-evaluating priority of this feature

bugs://73848 got closed with status notfixable.

Unfortunately ‘fixing’/implementing this feature can potentially break a lot of existing .NET code

All and every RODL Structure defined via Service Builder is already marked with AutoCreateParams attribute. So regenerating any _Intf .NET code can potentially change behavior of existing clients code