# Parameter as Array is empty jruby-ole32

**URL:** <https://www.ruby-forum.com/t/parameter-as-array-is-empty-jruby-ole32/246272>\
**Category:** JRuby\
**Created:** [September 23, 2013, 5:03pm UTC](https://www.ruby-forum.com/t/parameter-as-array-is-empty-jruby-ole32/246272 "2013-09-23T17:03:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [September 23, 2013, 5:03pm UTC](https://www.ruby-forum.com/t/parameter-as-array-is-empty-jruby-ole32/246272/1 "2013-09-23T17:03:35Z")

</div>

Dear developers,

I’m testing to connect with a DLL created in C# with this simple  
strcuture:

[C# CODE]…

public interface ICore  
{  
[System.ComponentModel.Description("… array test")]  
void MyTest(string[] str);  
}

public class Core : ICore  
{  
public void MyTest(string[] strArray)  
{  
foreach(string str in strArray)  
{  
Console.WriteLine(" \>\> [" + str + “]”);  
}  
}  
}  
…

Then I defined the next array to be pass to the method defined.

[Ruby code]…

libs = [‘one’, ‘two’]

lib3 = WIN32OLE.new(‘MyCoreDLL.Core’)  
lib3.MyTest(libs);

…

But the result is empty when it is displayed in the C# method…it  
contains the same number of objects than the array…but the data  
contained is always blank.

C:\DEV\MyCoreDLL\>jruby test.rb  
[“one”,“two”]

> > []  
> > []

Any idea?

Thanks in advance  
Antonio
