02-07-2017 08:16 AM
To .Net Object doesn't work for custom datatypes (unless maybe when they implement some magic .Net class factory of something). You have to create them explicitedly yourself.
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
public struct Cluster
{
public int value;
public string text;
}
public class TestClass
{
int test;
public TestClass()
{
test = 0;
}
public int Initialize(int sequence, Cluster record)
{
test = record.value;
return 0;
}
public int GetValue()
{
return test;
}
}
}
This works!
11-06-2022 03:50 AM
And by the way that example has an object leak!
The cluster refnum needs a Close node too after use!