Export to C#

I want to replace a DLL written in Delphi Prism by C#. I have decompiled the assembly in C# and compiled again. If I open the assemblies in the dotPeak, they look the same. However, If I replace the original DLL by my, C#-based I get the error:

Uncaught Exception: System.MissingMethodException: Method not found: "Void ClimateControl.TClimateData..ctor()"

 

The TClimateData is defined in Prism like this:

TClimateData = public record
  public
    tempSensor:Double;
    tempHeater:Single;
    humidity:Double;
  end;

I have exported the assembly to C# and the corresponding code in C# is:

public struct TClimateData
{
public double tempSensor;
public float tempHeater;
public double humidity;
}


Please sign in to leave a comment.