DotNetGetFloat Function

Action

Gets the float return value of the last DotNetCallMethod call in fReturn.

Include file

DotNetAPI.bdh

Syntax

DotNetGetFloat( in    hObject : number,
                inout fReturn : float ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hObject Handle to a .NET Object
fReturn Float variable that will receive the return value of the last DotNetCallMethod call

Example

dcltrans
  transaction TMain
  var
    hObject, hObject2 : number;
    fReturn : float;
  begin
    DotNetSetString(hObject, "ConstrValue1");
    
    hObject := DotNetLoadObject("bin\\Release\\MyDotNet.dll", "MyDotNet.TestClass");
    hObject2 := DotNetLoadObject("bin\\Release\\MyDotNet.dll", "MyDotNet.ParamClass");
    DotNetSetFloat(hObject, 1.23);
    DotNetSetInt(hObject, 123);
    DotNetSetBool(hObject, false);
    DotNetSetObject(hObject, hObject2);
    DotNetCallMethod(hObject,"TestMethod");
    DotNetGetFloat(hObject, fReturn);
    DotNetFreeObject(hObject);
    DotNetFreeObject(hObject2);
  end TMain;