BDL Parameters

If a method, whether it is a transaction or a test method, has a return parameter, the Code Generation Engine stores the value by default in a variable with the name xResult, where x depends on the return type. To change this behavior, apply a BdlParameter attribute to the return type of the method and pass the variable name as the first parameter.

BDL Parameters

C# Code BDL Script
[Transaction(Etranstype.TRANSTYPE_MAIN)]
[return:BdlParameter("sConcatParam")]
public string TMain(string s, int n)
{
  return s + n.ToString();
}
dcltrans
  transaction Tmain
  var
    sConcatParam : string;
  begin
    DotNetSetString(hVuser1, "stringvalue");
    DotNetSetInt(hVuser1, 123);
    DotNetCallMethod(hVuser1, "TMain");
    DotNetGetString(hVuser1, sConcatParam, 
      sizeof(sConcatParam));
  end;