excel - C# Com-Add-In return object or nullable array -
i wrote com-add-in. if return double[] c# code works.
but if try return double?[] or object[] type mismatch in vba:
dim values() object values = automationobject.getvaluesfromcsharp(5)
the c# code:
public object[] getvaluesfromcsharp(int id) { return new object[] { 1.0, 5.0, 3.0 }; }
or
public double?[] getvaluesfromcsharp(int id) { return new double?[] { 1.0, 5.0, 3.0 }; }
this works in vba:
dim values() double values = automationobject.getvaluesfromcsharp(5)
and c#:
public double[] getvaluesfromcsharp(int id) { return new double[] { 1.0, 5.0, 3.0 }; }
Comments
Post a Comment