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

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -