How to pass Cell array to .NET assembly.

14 次查看(过去 30 天)
rohan
rohan 2011-10-9
评论: KAE 2018-3-6
I am Beginner to MATLAB. By using the command NET.addAssembly i am loading .NET Assembly. Instantiating the object of Assembly's class i am invoking the methods of the class.
Passing the parameter such as double, char to method of assembly class its working fine.
But when i am trying to pass cell array to method of instantiated class its showing the error parameter mismatch.
i have done following procedure
s=NET.addAssembly('name of assembly')
t = s.AssemblyHandle.GetType('Class present in assembly');
obj = System.Activator.CreateInstance(t);
obj.PassCellArray(CellArray);
.NET MEthod
public void PassCellArray(System.Object[] dd) {}
As reference from MATHWORKS,using this object passing the Cell array to method which has parameter as System.Object[].
So please help me for how to pass cell array to .NET method.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with Microsoft .NET 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by