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에서 Call Web Services from MATLAB Using HTTP에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!