Can I call hidden methods from a .NET Object through the Interface that it implements in MATLAB 7.13 (R2011b)?
Show older comments
Suppose I have a .NET Assembly compiled from the following C# code:
namespace ClassLibrary1
{
public interface IClass
{
String myFunction(String s);
}
public class Class1 : IClass
{
String IClass.myFunction(String s)
{
return String.Format("Hello {0}", s);
}
}
}
As you can see I have used Implementation Hiding for myFunction. Or in other words in C# I CANNOT call myFunction as follows:
ClassLibrary1.Class1 obj = new ClassLibrary1.Class1();
obj.myFunction("World");
I can call myFunction through the IClass interface however:
((ClassLibrary1.IClass)obj).myFunction("World");
Can I also do this in MATLAB?
Accepted Answer
More Answers (0)
Categories
Find more on Get Started with Microsoft .NET in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!