当我通过PHP索引数组:我可以将一个PHP关联数组传递给ComVisible .NET函数吗?
$myVar = new COM('MyClass');
$myVar->DubbleArray([1, 2]);
...谈到通过到C#或F#作为System.Object的[],并且我可以相应地处理它,例如:
[<ComVisible(true)>]
type LettersClass() =
member this.DubbleArray(array: obj[]) =
// do stuff with the values in the array
但是当我通过一个关联数组:
$myVar->DubbleArray(array('first'=>'1st','second'=>'2nd'));
...它的DBNull来通过。
有什么办法通过COM将关联数组传递给.NET函数吗?
有没有比传统方法更容易/更安全/更高效的方法来通过它们之间的PHP和.NET? JSON序列化? –
我不熟悉任何其他方式。这可能是可能的,你可能想用.NET标记你的问题 –