How do you call a C# function with overloaded return arguments from MATLAB?
古いコメントを表示
Suppose I have the following code in C#:
public class MyClass
{
public void MyFunction(out string str)
{
str = "Hello";
}
public void MyFunction(out int a)
{
a = 5;
}
}
Suppose I then want to call this function from MATLAB:
>>NET.addAssembly('MyCSharpDll.dll');
>>obj = myNamespace.MyClass();
>>number = MyFunction(obj);
The last call is ambiguous. I get this C# situation in an API from a third party. How can I tell matlab to call MyFunction with the return type I want?
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で .NET Methods in MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!